The very first traffic light, installed outside the Houses of Parliament in London in December 1868, had red and green gas lamps for nighttime use. The device was pretty crude, and less than a month after it went operational, it exploded and killed the unfortunate traffic cop who was operating it.
Obviously, we’ve come a long way in traffic light technology, but we’ve stuck with the same color scheme. What is it about red and green that gave them such lasting power?
The guys who made that first traffic light borrowed their palette from the railroads. British railwaymen of the time often used red, green, blue, black and white flags, semaphores and lamps for signaling. In January 1841, faced with Parliamentary investigation over a number of accidents, the major railroad managers met to discuss safety issues. Henry Booth of the Liverpool and Manchester Railway was a driving force at the meeting and recommended standardized hand signals and color schemes. The colors adopted were those used by Booth’s lines: red to indicate danger, white to indicate safety and green to indicate "proceed with caution."
Booth’s use of these colors, in turn, seems to have come from a common practice in heavy industry of the era. Many motors and other industrial equipment had indicator lights that were red when the equipment was stopped and green when it was running. Since people were already familiar with this color scheme and its meaning, it makes sense that it was handed down into the railroad industry and then to traffic lights.
As for why the early industrialists chose red to mean stop and green to mean go, we can only speculate. In color symbolism, red generally evokes danger and makes it a good choice for a warning signal. Green, on the other hand, is calming. While that doesn’t seem to lend itself well to “go,” it may have been chosen for a more practical reason - it contrasts well with red and is highly visible without being harsh or distracting.