Photovoltaic solar cells use light energy from the Sun to generate electricity through the photovoltaic effect. The photovoltaic effect is related to the photoelectric effect. Where light is absorbed by a material (such as crystalline silicon), causing excitation of an electron to a higher-energy state, this excitation in turn creates an electric potential (or voltage). Current flows through the material (cancelling the electric potential) and this flowing current can be utilized as direct current (DC) electricity. Adding an inverter allows for DC to be converted to alternating current (AC).

Solar cells are clustered together to form solar modules, typically a grid of 6x10 cells to make a module, modules in turn are clustered to form solar panels.

More Info: en.wikipedia.org