Here's my recommendation. You should move when you're looking for an opportunity that your current employer can't or won't fulfill. Exceptional circumstances aside, you should stay with a company until you've achieved the goal you set out for yourself to begin with.
For example, when you accept your first job out of college, your goal might be "gain a few years of experience on a large project." Or it might be "gain some experience building large web applications." etc.
Beyond that first job, you might want to try a new area. If you've been working on games, you might be interested in web or enterprise. If you've been working on web, you might be interested in rich client apps. If you're in a small company, it would make sense to leave the company to get that chance. You need to keep moving forward.
At a larger company (google, apple, MS, etc), I would think the main reason to leave would be to expand your influence. You may want to be a manager or work in a startup where you have more control. Those are great reasons to leave.
And myself, working at a large company, I see many senior people coming back after trying their hand in a startup for a handful of years. It's often a huge career boost for them. They come back with a proven ability to manage a product.
Typically, I wouldn't say it's really worth your time to change jobs if you're happy. You don't need extra names on your resume. More years is better. When you change jobs, make sure there's a GOOD reason. That might be professional, it might be personal. But you shouldn't be jumping from company to company. Set yourself good 3-5 year goals when you accept a job.