If your fork stops working like it should, then clearly it is need of a service. Otherwise, service your fork when it needs it depending on your riding conditions and how much you ride.
"When it needs it"
"When it needs it" is hardly helpful. When does it need it? Most modern air forks have a manufacturer recommended service interval of between 50 and 100 hours, but the absolute best way to determine when/how often you should service your fork is by inspecting the wiper seals. These are the first line of defense in stopping dirt from getting into your fork. Once you get dirt inside, bushing and stanchion wear will occur within days, trashing your fork quick-time.
Take a look at the picture below. Dirt has gotten past the first lip on the seal and is being held back by the second lip. This is where you want the dirt to stop. Keep riding and dirt will fill the gap between the first and second lip and then go past the second lip. The next line of defense is the suspension grease packed into the seal, this should capture and stop any dirt that has gone past the second lip. This suspension grease also keeps everything running super slick. Finally, you can just make out the foam ring, and although its dirty with fine dust that has made it past the seal, it is still wet with splash lube oil. This also stops dirt from getting to the bushings and keeps the fork lubed and super plush.
Summing up
If you drop the lowers on your fork and it looks like the picture above then you're servicing it in time and you can be sure that the performance of your fork has not been adversely impacted by not servicing it. However, if:
- seal no longer has any grease;
- dirt has migrated past the second lip; or
- foam ring is dry
then you should look to service your fork more frequently.