This may be the most common question that people ask me when they come into my store in Los Angeles. Most people are under the false impression that you are supposed to have them checked every 7 years. The fact is that the Shulchan Aruch (Code of Jewish Law) states that they need to be checked by a scribe twice in every 7 year period. That means about every 3.5 years.
In addition, many contemporary Rabbis are of the opinion that nowadays Mezuzahs should be checked more frequently. This may be because the scribes today are not as expert in preparing the ink and parchment as they were in the olden days. This causes letters to crack and fade more rapidly then they did at the time the law was codified.
The Kitzur Shulchan Aruch states that a God fearing person should make sure to have their Mezuzahs and Tefillin checked every year before Rosh Hashana, in order to assure that they start the new year with all of their Mitzvahs in order.
It is also an ancient custom that people have their Mezuzahs checked when there are problems in the home such as injuries, illness etc. This is because the Mezuzah is supposed to act as a shied against such things.
It is customary to have them checked during a pregnancy to insure the utmost protection for the mother and baby during such a sensitive time. In summary, you should make sure to have your Mezuzahs checked at least every 3.5 years. It is better to do it more often.
The rules for Tefillin are essentially the same.