"The reason is the sensors can become a little less sensitive after a period of time, so it's a good idea to get a new smoke alarm," said John Drengenberg , Consumer Safety Director at Underwriters Labs. "They're cheap enough and it's good insurance."
That advice goes for both battery-powered and hard-wired smoke detectors. They need to be replaced at least every 10 years.
If you want the maximum protection, make sure you buy a dual-sensor smoke detector; one that's both photo-electric and ionization.
"The photo-electric and ionization type smoke alarms respond to different types of fire," Drengenberg explained. "One would be a smoldering fire; one would be a flaming fire. Having the dual sensors means that regardless of the type of fire, the alarm would give you the warning as early as possible."
It's a good idea to carefully vacuum around the detector from time to time to remove dust and cobwebs that could interfere with those sensors.
For more information
UL: Maximizing safety: proper smoke alarm use
UL: Types of Smoke Alarms
Consumer Product Safety Commission: Smoke Alarms