Locomotive Mars lights are a distant memory here in the US. They were phased out many years ago.
A Mars light is an additional headlight mounted on the front of a locomotive. The Mars light mechanically moves the beam around in a pattern and makes the train much more obvious to motorists and pedestrians along the track.
I don't think it was really intended to let the train crew see to the right and left. It was intended to alert people to an approaching train. They were really striking when you saw one coming toward you. You immediately knew it was a train, and not an automobile on a road near the track.