In the beginning of 19th century Britain adopted red color as danger signal for railways also. Experts believe that as deep red color of blood could shock people into alertness, blood-red color was the most suitable as a signal for caution. As red being the color having the longest wavelength they believed that a danger signal of that color would draw attention promptly even from a distance.
Later on in 1886 the British parliament gave approval to a resolution favoring the adoption of red color as cautionary ‘stop’ signal for the use as read signal also. The regulatory authority of railways in Britain had found that red color being easily visible to locomotive drivers even from a considerable distance it would not matter much if it was kept on a somewhat lower level. So the green light got the first place on the top. Later on when the time came for putting signals on the roads, in view of shorter height of signal poles it became a rule to keep the red light at the top level.
Having read this explanation one brief matter should be understood also: The color which attracts the attention most is not red but reddish-yellow. That is why yellow-orange color is preferred to red color for life-jackets on the ships and planes. The cartridges of flare pistols used for signaling distress at the sea or some isolated place also produce yellow-orange smoke.