there are plenty of timer switches that can be set based on sunset and sunrise. You put in your location and it gives you close enough times.
Or you can use a home automation system where programming can be tied to sunset and sunrise or any variation from there. For example, have lights go on 4 hours before sunset. But then you start getting a little more expensive since you need a controller. But the switches are less than $60. Installation of a light switch is pretty straightforward. Honestly the hardest part is pushing everything back in if it's a box with 2-3 switches. Of course 3-way switches are a little more complicated.