poor charge or intermitant charge from the alternator, also check condition of the alternator belt
Battery light usually means alternator not charging. Most common solutions would be be a bad alternator, bad connection, or loose alt belt.
Possible alternator problem
More than likely your alternator is getting ready to go out.
Loose connection? Bad ground? Weak battery?
Normally it means the alternator is failing.
It is possibley your alternator or battery
Sounds like the brushes are worn down in the alternator.
If the battery light flickers, it's losing voltage. It would be worse when the lights and other accessories are running. It just may not be enough to kill it yet. I would suspect parts in this order. Alternator(if there is a voltage guage, should be around 13-14 volts) discharged battery
Probably your battery cable or cables are loose on one end or the other.
The car light? YES! Leaving your car light on WILL make your battery run out. Things like leaving your car door open if the light is on because it is open will cause the lgiht to Mae your car battery run out. There is a big difference between shorted out a car battery and running the battery down. Lighting in itself won't short a battery out but will run it down.
Keep the car light on
From your description it sounds as if the warning light is operating correctly. When the engine is running the battery is being charged and the electrical needs of the vehicle are being fully met by the alternator's output and the battery is not expending stored power. When you turn the engine off the alternator stops running and anything in the vehicle that requires electircal power is suddenly dependent upon the battery to supply it. Thus, the battery begins discharging power, which triggers the warning light indicating that the battery is being discharged.