[L]ights were not obligatory on cars until well after the First World War. The Ford Model T, first made in 1908, had oil lamps on its rear end but these were not introduced until around 1915. And though red was the long-standing convention for tail lights on cars — thanks to the railways — this was not codified until the Vienna Convention on Road Traffic of 1949.
Red: stop, don’t hit this. It’s an example of “aposematism” — using colour to signal a warning, effectively the opposite of camouflage. Red has the longest wavelength in the visible light spectrum, which means it’s less likely to be scattered by particles in the air and red lights can be more easily seen at distance in fog. Going back to first principles, it has always been used to signify danger. The red-winged blackbird that flashes its plumage to deter attackers, the coral snake and the poison tree frog. Dictionnaire Le Robert, the Gallic equivalent of the Oxford English, states the lanterne rouge is the lamp on the last vehicle of a convoy…. Racing cyclists in the good old days really did carry lamps. Graeme Fife, author of books such as Tour de France: the History, the Legend, the Riders, told me of a drawing from a late 19th-century edition of the Illustrated London News, depicting clubmen on a motley assembly of bicycles leaving a meeting in a procession of Chinese paper lanterns, spherical and cylindrical, attached to rods on their bikes.
— Max Leonard, Lanterne Rouge: the Last Man in the Tour de France