Photocell and Relay switch not working properly
I an embedded solution might be easiest for you, but you can try something like this:


Where the transistor is something like a 2N3904, and the diode could be an IN4007. The pot on R2 should be maybe 10k-20k range, the resistor at the base of the transistor should be around 1k, and depending on the resistance of your particular relay, you may also need a small series resistance between emitter and ground to make sure you don't give the transistor too much current.