The magic lies in a little metal box with a glass top perched high up on the pole of one light in a given area.
Inside is a highly sensitive photoelectric cell which reacts to the absence of light.
When it gets dark, the cell automatically closes the circuits, allowing electricity to run through and turn on the particular series of lights. With the first light of dawn, the “eye” opens the circuits, causing the lights to go off.
The amount of light or absence of light necessary to stimulate the cell can be varied from one device to another in order to accommodate varying conditions in different areas; some streets receive direct light from the sun, for example, whereas others are shrouded by the tall buildings or trees.