When to Buy
Apple updates their computers with new specs quite often. A typical Apple update will give you a slightly faster processor, more hard drive capacity, and sometimes more RAM. The worst thing to do, when buying a computer, is purchase a computer right before an update is released. You don't want to get a new iMac and find out a week later that a better one has just come out. Once in a while, Apple will even lower prices on computers during the updates.
There is no specific "right time" to buy. Apple updates their computers randomly, and they update different models at different times. For example, Apple may have a keynote where they give all MacBooks and MacBook Pros updates... but no other computers. The next update that they have may be for the Mac Mini and the Mac Pro. And the one after that, they will update the iMacs.
Although there is no specific time, you can estimate good times to buy and bad times to buy. Check to see when Apple last updated their iMacs. If it was within 4 months of the current date, it is a good time to buy. Chances are, Apple will not release another iMac update for a while. If you find out that the last iMac updates were 10 months ago, it is probably a bad time to buy. More than likely, Apple will be giving their iMac lineup an update soon.
You can also estimate good times to buy by keeping up-to-date the tech industry. If a new standard is released, Apple will pick up on it and update their computers to keep up with competitors.
Working example: USB 3.0 is officially released. Dell and HP immediately revamp all of their computers with USB 3.0 ports and get rid of the older USB 2.0 ports. Apple will update their computers as well, in order to keep up with the industry. If you hear that USB 3.0 is going to be released next week, don't go out and buy an iMac.
You can find some great examples of Apple updates here and here.