I don't know what model you have, but my first check would be to take a voltmeter and measure the voltage across the battery terminals with the engine running. Test with assessories on and off (including headlights).
You should be in the range of 12.5 - 14.4V depending on rpms and current load.
If your headlights appear bright, then your alternator may be overcharging! Actually the regulator would be the culprit, but unless your alternator is really old, it's an internal component and not a seperate replacement part.
I just got through an alternator replacement a month ago on my 300E and the voltage prior to that was 17.5V!!! No battery light on, but I could smell (and see) the electrolyte venting off the battery!
One other thing to check is that one of the alternator leads may have loosened or come off at the alternator...that may also cause the battery light to come on.
2009 ML350 (84K) - Family vehicle
2001 CLK430 Cabriolet (71K) - Wife's car
2005 BMW 645CI (124K) - My daily driver
2012 Mustang V6 (60K) - Daughter's car