some time ago (but in this galaxy) I used a raspberry pi (one of the first ones), an I2C analog to digital chip, a light sensor, and a relay to turn on solar powered security lights. The only issue is as the raspberry pi is a computer it can do so much more; plus the SD card has a limit to how many times you can write to it which means it will die some day.
After some time with messing with electronics; I discovered and created a new method for this; a WAY simpler method to boot. It just uses one transistor (an NPN), one 10K potentiometer, one 1K ohm resistor, one LED, one relay, and one diode (1N4007). Today I got it installed and it works great. I'll post some pics / make a video later.