How Can Solar Cell Work to Generate Electricity ?

As we know that solar cell is a semiconductor material that converts light to electricity, this semi conductor material may be silicon or gallium or cadmium telluride but the crystalline silicon solar cell is the most commonly used to generate electricity representing 95 % of the market share.
How solar cells work?
Regarding crystalline silicon cell, the silicon atom has 4 bonding electrons at the outer shell and all silicon atoms is connecting to each other by sharing electrons to complete the outer shell for each cell to 8 electrons and hence the result is silicon lattice.
To generate the solar cell we introduce impurities (doping atoms) into this silicon lattice to form to type of crystalline silicon:
Type one called : N- type silicon : impurities are phosphorus atoms with (5) electrons in the outer shell so we have one electron more for each connection between one silicon cell and one phosphorus cell so at N – type crystalline silicon we have abundant of negative electrons.
Type two called : P- type silicon: impurities are boron atoms with (3) electrons in the outer shell so we have one electron less (hole) for each connection between one silicon cell and one boron cell so at P – type crystalline silicon we have abundant of positive holes .
If we bring p-type silicon layer together with n-type silicon layer a p-n junction is formed, at this junction the abundant electrons and abundant holes will start to diffuse in opposite directions to each other but fortunately some positive charge atoms remain at n-type layer (at transition region) and some negative charge atoms remain at p-type layer (at transition region), this create a region known as space charge region with an electric field that opposed to the movement of the transition and that result in stopping the diffusion of holes and electrons.
If the solar cell two contacts are externally connected to each other by an outer electrical wire the electrons will flow in wire generating electrical current in the condition that it will be enough energy to motivate electrons.
Now if the solar cell (p-n semiconductor) is exposed to the light (input energy) photons and electrons diffusion will occur and the space region will formed and hence a voltage will present on the solar cell contacts and if the electrical circuit is closed , the current will flow…this process as whole is called photovoltaic which mean converting sun light to electricity.

Photovoltaic Solar Systems Types & Germany practice

The most developed method to generate electricity from renewable energy sources is photovoltaic solar systems.
There are two types of photovoltaic systems:
(1) Stand Alone System: at this type the total electricity generated from the solar photovoltaic panels should meet the demand at all times during the day. But this is impossible since we haven’t sun at the nigh, So PV systems should be supported by either two means:
First: by additional electricity power source like wind turbine, diesel generator or cogeneration engine. This type is called photovoltaic stand alone hybrid system.
Second: by a storage systems (batteries). This type is called photovoltaic stand alone with storage system.
(2) Grid connected system: at this system PV panels work in parallel with the public electricity grid in the condition that in case of grid electricity outage, PV panels will automatically switched of until the electricity of the public grid is returned back.
Germany Experience:
Germany consider as a leading country in using PV systems. Most of PV systems present in Germany are of the type grid connected system which present all over residential, commercial and industrial sectors due to the premium feed-in tariff  as all the energy generated is fed to the public electricity grid . Germany government predicts that after 30 year one third of electricity power supply will be generated from photovoltaic systems.
We hope that all countries will do like Germany government does in order to meet the increasing demand of electricity.