A silicon diode, having no bias voltage applied, will generate direct current all by itself if enough electromagnetic radiation hits the P-N junction. This is called as photovoltaic effect. It is principle by which the solar cells work.
Photovoltaic cells are made to have greatest possible P-N junction surface area. This maximizes amount of light which falls on the junction. A single silicon photovoltaic cell can generate around 0.6 V of dc electricity. The amount of current which it can deliver depends on surface area of junction. For every square inch of P-N surface area, the silicon photovoltaic cell can generate around 160 mA in direct sunlight. Photovoltaic cells are connected in the series parallel combinations to provide power for solid-state electronic devices such as portable radios. A assembly of solar cells is called as solar panel.
Solar cell technology has advanced rapidly in the last several years. Solar power is quite expensive to produce, but cost is going down and solar cells also do not pollute.