Most likely causes are: a bad alternator (check the belt and idler pulley too), a bad connection and or corrosion atthe battery/cables, or a loose ground connection. Sounds like you were running on battery power until the battery drained down.
__________________
|