For actual how they work, the most simple design connects a light dependant resistor in series with a low power heater element. The heater element is attached to the bi-metallic strip of a thermostat. When light shines on the LDR, current flows and the element heats causing the thermostat contact to open, switching off the light. As it gets darker, less current flows, the element cools and the thermostat closes, switching on the light. There can be quite a delay in switching on with this type, the switch off tie is a lot quicker. I was playing with one of these earlier this week..