The first and most obvious indicator of knowing when your roof needs to be replaced is if your roof is leaking. Oddly, some people do not even know their roof has a small leak until it drips down through the ceiling of their living space. It's a good idea to periodically take a flashlight and peer up into the crawlspace or attic during a rain storm and see if there is any water damage. If you catch it early, it will not cause as much damage. Once the leak comes through to the living space, then you're looking at thousands of dollars in damage, rather than hundreds.
From the exterior of your home, you can usually see signs of wear. If there are any tree branches rubbing against the roof, it is important to keep them trimmed back, as the branches can wear the tiles away little by little.
The slate or tile type roofs will not wear away as quickly, but depending on the size of the branches, some damage will be caused eventually.
Take a walk around the outside of your home. Do the tiles look brittle? Are there any bubbling or missing shingles? It is also important to note the condition of the facia board. If this is rotten, peeling, or warping, then it's safe to say that the roof is in about the same shape as the board, as they were more than likely put into place around the same time. It's time to think about replacing it all.