You could use a real-time clock or a light sensor of some kind to tell when to switch them on.
The Pi has neither of these and so they would have to be added via the correct interface.
Have a look at this thread:
http://www.raspberrypi.org/phpBB3/viewt ... DR#p222082
and this one:
http://www.raspberrypi.org/phpBB3/viewt ... dr#p219167
Personally if using an LDR I would google 'LDR' 'Transistor' 'Switch' and adapt a sipmle circuit using an LDR as part of a potential divider to interface with the GPIO.
Otherwise I would go to ebay and search for 'Real Time Clock' and 'Raspberry Pi'