Here is a dark detecting circuit which will activate the relay in the circuit when there is no light on the surface of photoresistor. This dark detector circuit is very easy to build and using only few components. The photoresistor will switch on the transistor 2N2222 when there is no light on
its surface. When transistor 2N2222 become in ON condition it will activate the relay. You can adjust the sensitivity of the circuit with the help of 50K variable resistor. Use 5-6 volt relay.