I think every second update. It depends on usage I guess. If you only surf and use it for casual use then I'd say every 4-5 years. If you are pushing it hard like using photoshop and after effects - then as often as possible. Personally that will be every second model, always maxed out.
Though one could argue that this kind of usage is on the verge of not being meant for the iMac. But since adobe is incapable of optimizing their software for modern multithreading machines, the iMac is the best and cheapest option for professionals working with the adobe package. Besides, the iMac has apples currently best monitor in quality, IMO.