LDR using 555 increase the the 10k resistor to 100k or more this is where u insert your LDR the LDR has high resistance in the dark the lamp should come on then reduce its value to about 20K or less lamp should go off you could use a thermistor or any other senor device that has high resistance at measured value if you want the lamp to come on in the light and go off in the dark just swap position off the resistors play around with the 40k to get different thresholds