In order to understand photo cells you first need to understand the fabrication process of said photo cell. Photo-cells are generally made from silicon and some other doping agent. The doping agent generates holes (a space that lacks and electron) or excess electrons.

The electrons and holes live in two different levels of electric conductivity, the valence band and the conduction band. When you shine light onto a photo diode for example, you are actually bombarding it with photons! Photons are absorbed by the material and force electrons from the valence band to the conduction band.

Electrons that are in the conduction band are then free to move around, when an electric field is placed across the diode, the electrons in the conduction band begin to move toward the positive signal.

There is a whole lot of physics that determines how many free electrons there are in a material and how much photon energy the band gap can absorb. This is just a very brief example.