The photovoltaic effect
Most solar panels contain photovoltaic cells made from semiconductor materials such as silicon. When light reaches a cell, some of its energy is absorbed. That energy can free or energize charged particles inside the material, enabling an electric current to flow through a connected circuit.
From one cell to a useful system
Individual cells are linked together in modules, and modules can be arranged into larger arrays. Solar cells produce direct-current electricity. A system supplying typical grid-connected buildings uses an inverter to convert that electricity into alternating current suitable for many appliances and the grid.
Why output changes
A panel does not convert every bit of sunlight into electrical power. Output depends on the amount and type of light, cell efficiency, temperature, shading, positioning, and system components. Cloudy conditions can reduce output without necessarily stopping it completely.
What solar panels do not do
A solar panel converts incoming energy; it does not store electricity by itself. Batteries are separate components that can store energy for later use. Solar thermal technologies are different: they first capture sunlight as heat instead of directly generating electricity in photovoltaic cells.
Read the original sources
These sources explain the underlying science or reference facts. Review them when you need more detail or updated guidance.