This is a very broad subject.
The battery light should illuminate when the key is on and the engine is off. And should go out when the engine is running.
If you have problems, it could be from the alternator. The diodes control the light on the dash.
ASE CERTIFIED MASTER AUTO TECHNICIAN
MERCEDES SPECIALIST 11 YRS