The first stop-go traffic signal was erected in London on 10th December 1868 and consisted of two semaphore arms and two gaslamps - one red, one green.
An electric traffic light was erected in the US around 1912 in Salt Lake City by the appropriately named Lester Wire.