The red light came from an actual lamp, the red oil-lamp that hung on the last car of a railroad train.
These lamps were carried by railroad men to and from trains, and in some cases they were hung outside the brothels the men frequented between shifts.