One of the wires goes to a photo-electric cell ("solar cell") that generates voltage.
Another goes to a photo-conductive cell that detects the presence/absence of sunlight. Photo-conductive cells are made of cadmium selenide/sulphide.
The remaining wire is a common.