THE PHOTOVOLTAIC EFFECT:
The photovoltaic effect directly converts sunlight into electricity. Sunlight is composed of particles called photons. These photons contain solar energy. These particles contain different amounts of energy due to the different wave lengths of the solar spectrum. When the photons strike a solar panel they are either reflected, pass right through or absorbed. The photons that are absorbed generate electricity.
Whenever sunlight hits the cells, it knocks electrons lose from their atoms. As the electrons flow through the cell they then generate electricity.
Therefor the light carries energy into the solar panels.Wires connected to the panel then convert the light energy into electrical energy. Electricity is either used right away or stored in a large battery.
To understand more about photons and how this all works watch the video below.
http://www1.eere.energy.gov/solar/video/solarcell1.mpg
http://www1.eere.energy.gov/solar/video/solarcell1.mpg