The PV cells in a solar panel absorb the energy from the sun’s rays when it shines on the panel. By generating electrical charges that move in response to an internal electrical field within the cell, this energy generates electrical currents that allow electricity to flow.