Check the inner section of your roof for any holes (easy to find, they let sunlight in) or leaks. These are early signs of damage, and can lead to major repairs if left unattended. While these can easily be repaired, if this problem reoccurs frequently, it might be time to replace your roof.
After checking the interior, grab a ladder and climb up to the top of the roof. Check for any splotches of moss.; if moss is growing on your roof, the portion it covers may be rotting away, a sign that your roof needs to be replaced, especially if there are multiple growths on your roof.
In addition to looking out for moss, check for any missing or damaged shingles. If there is a huge bald spot on your roof, that will definitely need to be replaced.
It is difficult to tell when a roof requires replacing or if a repair will do; this decision is usually based on personal judgment call. A good rule of thumb, though, would be that if major repairs or multiple repairs are needed, you might be better off buying a new roof. It might even cost you less.