The circuit is operated in 5v battery the 1M ohms resistor is a LDR (dark sensor). When the dark time LDR is change into high resistance. So the current flow through the LED. When the lighting time the LDR is converted into low resistance. So the no current flow through the LED