Solar cells consists of a p-type and n-type semiconductor joined together. The free electrons in the n-type will diffuse across the p-n junction to fill the holes in the p-type semiconductor. This causes the n-type to become more positive and the p-type to become more negative setting up an initial potential difference. This sets up an electric field across the p-n junction which prevents further electrons diffusing across the p-n junction, this is known as the depletion zone. Thus when light above the threshold frequency strikes the surface of the solar cell, electrons will be liberated due to the photoelectric effect and will pass through the external circuit as opposed to the p-n junction and thus forming an electric current.
These are usually 4 markers if anyone else could tell me what I am missing, it would be highly appreciated