A photocell is a light-sensitive sensor. It measures the ambient daylight, not the time on your watch. When it gets dark enough—think twilight, not pitch black—the sensor triggers the light to turn on.
Guess what happens at dawn? The same sensor detects enough sunlight and tells the light to shut off. So your street lamp is basically a creature of pure light sensitivity, like a sunflower that blooms at night.
This is cool because it means the timing changes with the seasons. In the summer, the lights turn on later and off earlier. In winter, they’re on for longer.