well for starters you can atleast think of how you gona work it out!!
the simplest approach is to use the solar cell as a sensor itself.when the o/p stops coming then you can turn the light on.ofcourse easier said then done. give it a start and people will be more then obliged to help you.