When photons of light from the sun strike the cells on a panel the electrons within the cell become active.
The electrons start moving from a 'positive' side to a 'negative' side. This is known as a 'flow' of electrons.
The electrons are channelled together with conductors to create a larger and larger 'flow' of electricity.
The amount of energy generated depends on the energy from the sun, quality of cell / panel, orientation (angle from True North), tilt, shading and Cell temperature.