Depends. May be your battery is bad. But while driving everything happened, so I suspect the alternator.
Check the voltage while engine is running. It should be above 13.0 volts. I get 14.2 with AC/Headlights/wipers on.
If the problem is with your alternator, you can pull it out and inspect the brushes. These are the first thing that goes bad (wear out). You can buy replacement brushes on ebay or may be from the dealer.
Brushes look like follows: Most toyota brushes are identical and interchangeable
Alternator Brush Holder with Brushes Denso 021620-2010, -2180, -2200, -2201, -2630 - 1993 GEO STORM 1.6L NEW ALTERNATOR - 13569
for $950 + $300, you can get a low mile JDM engine installed!