Could be a few things. I'd first check for dirty battery terminals. But I suspect it's either the alternator, as in maybe a bad diode, or the voltage regulator. Is the car driven often or every now and then? The reason I ask is maybe the battery is getting low on charge from sitting, and when you drive the car the alternator must work extra hard to recharge it. Maybe put a trickle charger on the battery for a while prior to the next drive. If the light comes on then....it is definately something in the charging system. Also many auto parts stores will check your charging system with a meter for free....just a thought.
Also could be as Stradale says...."loose belt".