what cause the battery light came on stayed on

The battery light comes on when there is a problem in the battery charging system.
Assuming that when you say the battery light comes on, you do mean that it comes on and stays on while the car is running. I only say this because most, if not all cars flash the battery light when you start the car. But then the light goes out once the car is running, and that is normal. If there is is a problem,the light would remain on, indicating such problem.

Although your car may be starting and running now, it may not be in the near future. You need to check out a few things to get to the bottom of it so you can fix the problem before it REALLY becomes a problem.

The vehicles I've owned seem to time their mechanical failures and breakdowns at the absolute worst time possible. It's like they have some sort of warped sense of humor and get a kick out of watching me squirm.

The battery light in your dashboard comes on when there is a problem in the battery's charging system. The alternator is what makes that light come on.

I would make sure your fan belt is still on your vehicle. If it's not there, your alternator isn't charging your battery at all.

If the belt is there, it could be slipping which would cause the alternator to not be charging properly. If you check the alternator with a digital voltage meter with the car running, it must read 13.6 volts or higher (up to 14.2 volts) for the alternator to be charging properly.

If the voltage meter says anything under 13.6 volts, say 13 volts, then there is still a problem even though it is still charging,it's not charging properly.