As light decreases resistance increases causing the electrons to seek another path . As light increases resistance decreases causing the electrons to once again find a different path. Always searching for the path of least resistance
With more resistance and less light the electrons choose the path of the led effectively turning it on at night