If the tire gets wet or it deflates as it normally would in a couple of days, the generator wheel can slip. Check the tire pressure before each ride. It's not likely the generator, it's probably slipping.
Do what Mech says anyway, carry a spare light, generators blow bulbs if it's a halogen light.