Raspberry Pi runs a program that gets sunrise sunset data for my lat long, and then turns on off lights depending on that data plus preferences about when the earliest I'd expect someone to be leaving/coming.
Used to have a little timer that plugged into the outlet, but you'd keep having to update the on-off times as the seasons changed, and the clock kept drifting.
There are photo sensitive equivalents plugs, but apparently they don't work great, and they would keep the lights on all night long, and light pollution is a pet-peeve.