The standard photovoltaic effect is directly related to the photoelectric effect, though they are different processes. When the sunlight or any other light is incident upon a material surface, the electrons present in the valence band absorb energy and, being excited, jump to the conduction band and become free. These highly excited, non-thermal electrons diffuse, and some reach a junction where they are accelerated into a different material by a built-in potential (Galvani potential). This generates an electromotive force, and thus some of the light energy is converted into electric energy.
In the photoelectric effect, by contrast, electrons are ejected from a material's surface into vacuum, upon exposure to light. This also generates some electric energy (as the ejected electron is eventually captured on another electrode), though there is typically a high photon energy threshold. The photovoltaic effect differs in that the excited electrons pass directly from one material to another, avoiding the difficult step of passing through the vacuum in between.
Besides the direct excitation of free electrons, a photovoltaic effect can also arise simply due to the heating caused by absorption of the light. The heating leads to an increase in temperature, which is accompanied by temperature gradients. These thermal gradients in turn may generate a voltage through the Seebeck effect. Whether direct excitation or thermal effects dominate the photovoltaic effect will depend on many material parameters.
In most photovoltaic applications the radiation is sunlight, which is why the devices are known as solar cells. In the case of a p-n junction solar cell, illuminating the material creates an electric current as excited electrons and the remaining holes are swept in different directions by the built-in electric field of the depletion region.