How do photovoltaic panels generate electricity?
The photons in sunlight supply the energy that moves electrons from one layer of a conductive metallic chip plate to another. Charges separate. Electrons are moved from layer P to layer N. This movement of the electrons creates a current. An electrical charge is generated. The layer between layer P and layer N and the solar cell become a battery that have positive and negative poles.
A solar panel is created by connecting multiple units.
The number of cells in a module is determined by the desired power output of the module and voltage.