This is a good article from last year on Business News Daily about when the right time is to pack in your job and either move on to a different company or start your own business. The timing is essential because it could end up having a bearing on your future job prospects.
Some of the reasons why you might want to quit:
Reputation failure: You may have made a few bad choices, been off ill for a long time or even just been unlucky. But if you manage to damage your reputation in the workplace it is going to be really difficult (if not impossible) for you to redeem yourself among your colleagues. Time to move on.
Company failure: If the company you work is in trouble and possibly entering a death spiral, there’s not much point in hanging around. You’re more likely to be hired while still in a job so make sure you get started on the job search before you’re unemployed anyway.
No challenge: We all need to be stimulated in our work. If you find that there is no challenge in what you do anymore then it’s probably time to go elsewhere.
Illness: A job with too much stress or that you don’t like can actually make you physically ill.