In many locations they use light sensors, and if you live above a street oriented the right way you can see quite a cool effect of the lights going off sequentially down the street as the light goes below the threshold.
In other locations that I'm familiar with, they use a ripple relay, where a particular signal is transmitted over the power lines (a "ripple") in a way that doesn't affect unaware equipment, but signals the target equipment (relays on the supply to the streetlights) to switch. Similar technology is used to provide day/night rates where one circuit is only energised during off-peak hours.
I don't see any reason the ripple relay couldn't be bypassed to provide a second always-on feed for the Wi-Fi gear, but it might be that the ripple relays are not at every lamp post but instead at the substations or roadside cabinets, in which case there would indeed be some cost to run the extra circuits.