A lot of roads used the red "mars" light. C&NW used both red and white on passenger E-units and the red only on a lot of freight units. I think they probably concentrated the red-only on their double track lines. I think that the C&NW was the first to install Mars lights on locomotives. A fireman (the kind that puts out fires) had recommended the development of the Mars light to the head of Mars candy; so it was first installed on fire trucks. GN placed both the red and white "mars" lights on (at least) passenger units. NP placed the red and white "mars" lights on all F units, both passenger and freight. The U-25, 28 and 33-Cs and the SD 45s were purchased with only the red "mars" light (actually, the Pyle gyralight, which does a oval/circle instead of the figure 8 of the actual Mars light.) CB&Q put red and white "mars" lights on everything except end cab switch engines. Amtrak's SDP40s came out with "mars" lights.
A derailment on multiple track blocking adjacent tracks is a critical situation in that a train on an adjacent track can run into the derailed train. The red "mars" light was meant to deal with that potential hazard. If a train approached another train displaying a red "mars" (oscilating) light, it was to stop before it passed the head end of that train (if possible.) Today the situation is/was handled by throwing a red fusee on the adjacent tracks and also by radio warnings.
"Mars" lights were also used on the rear of passger trains as sort of an additional marker. Sometimes it was configured so it was on steady until the brakes were applied when it went into oscilating motion to warn following trains.
I put "mars" in quotes because a lot of these oscilating lights were Pyle gyralights. I don't recall any rule book which mandated the used of red "mars" lights when running against the current of traffic.