|Fig: Working of Solar Cells|
Photons strike special molecules in the Photovoltaic cell. Electrons in these molecules absorb the energy form the photon fly off the molecule and down and electric circuit following a path in an electric field that forces them to travel from positive to negative.
Along the way the circuit takes electrons through different electronic devices where their energy is used or through batteries where the energy is converted into chemical energy and stored.
Since electrons travel in a circuit they eventually return to the group of atoms from which they were lost. An electron doesn't return to the exact atom from which it was lost but will return to an atom in the group of atoms which lost their electron.