Why are there lights on the roof of trains?

There are lights ontop train carriages, why do they do they exist? Who do they they benefit?

To me and my roomate it seems like a legitimate question because the lights serve no purpose, surely its just a waste of energy.
5 answers 5