2 min
There are thousands of colors — so why are traffic lights always red, yellow, and green?
Almost every country on Earth picked the same three colors for its traffic lights. Half the answer is physics — red scatters the least — and half is history.

Answer
A strange thing to notice
Red means stop. Green means go. Yellow means get ready. Almost every country on Earth uses these same three colors on its roads. But we can see thousands of colors. So why these three?
Start with red
Red light has the longest wavelength we can see — about 620 to 750 nanometers. Long waves are harder for tiny air molecules to knock off course, so they scatter less. In fog, in rain, or at night, red stays bright and stays visible farther away than any other color.
For a driver, being seen is everything. The message that must be seen first — STOP — went to red.
Red had a second advantage: it already meant danger. Railways were using red for "stop" more than a hundred years ago, and roads simply borrowed the habit instead of teaching everybody a new one.
What about green and yellow?
Green started out as the backup. The earliest railway signals were: red for stop, green for caution, and white for go.
But white lights were too easy to mix up with other lamps. After some bad accidents, railways changed the rules: green means go, yellow means caution. Cars copied the railways, and we still follow that agreement today.
Here is a little-known story: in 1868 the world's first traffic signal was put up outside the Houses of Parliament in London. It burned gas. In 1869 it exploded and injured the policeman operating it, so the whole thing was taken down. The idea did not come back until electric signals appeared in the United States in 1914.
Try it yourself: make a glass of "fake fog"
Wrap one flashlight in red cellophane and another in blue. Stir a few drops of milk into a glass of water. Turn off the lights and shine both beams in from the side of the glass.
You will see that red pushes much farther, while blue gets scattered and fades almost at once.
Same reason the sky is blue, sunsets are red, and red lights travel the farthest: short wavelengths are the easiest to scatter.
Michael's Thought
I always thought the traffic light colors were picked at random. Turns out red reaches my eyes first because it hardly ever gets knocked off course on the way.
Sources
Related WHYS

Why is a wedding ring worn on the ring finger? — And why the 'vein of love' is not real
People say the wedding ring goes on the left ring finger because a vein runs from it straight to the heart. That vein does not exist. The rule was actually written down in the English Book of Common Prayer in 1662.

Why do we put candles on a birthday cake and blow them out?
The popular story about ancient Greek cakes for the moon goddess doesn't hold up. The version we can actually trace starts with 18th-century German birthday parties — and blowing out the candles, a 2017 study found, adds about 14 times more bacteria to the cake.

Why do we clink glasses when we toast?
Clinking glasses probably has nothing to do with poison — there is no real evidence for that story. It looks like a secular leftover of ancient offerings, and the word "toast" first meant spiced bread in wine, then the person honoured by the drink.