This project looks interesting, but more complex than necessary. Wouldn't a couple of diodes pointing at the sun do the same job?
When exposed to sunlight, they'll produce a small voltage which can probably be detected via the GPIO and then switch stuff on or off.
On when voltage is low / none, off when voltage is high (i.e. The sun is out)
It's essentially how those cheap solar garden lights work, they detect sunlight and turn the led off while switching their charging circuit on. When the sun goes down, they do the opposite.