i like to replace my helmets every 3-5 years. If you have a bad fall and you may get a more severe concussion fro hittin your head then i suggest getting a new one. :)
Normally you'r helmet break after a fall so it's good to change it after a bad fall eventually. Also after some years (like 5 years r something it's good to change)
Every five years (or so) from date of manufacture. Less if it's been in the heat or direct sun, as the temps break down the plastics and immediately if dropped hard (on concrete / asphalt) or if you hit your head in a fall.
After any fall where you may have hit your head and also if you drop it and it gets a dent