It may not have been the stoplights themselves, but something else in that area.
It's likely caused by the loop detector embedded in the pavement (the circle or rectangular cuts you see at intersections). The loop detector works by generating a magnetic field, and when metal (such as a car, or a bicycle wheel) comes within range, the light controller senses a change in the field, causing the light to trigger. A common side-effect is interference with wireless cyclometers.