You may be wondering how man were able to turn sunbeams into energy, which can be able to produce electricity.
The sun's light is made of energy and this is the reason why when an object is placed in the sun, after sometime of the object being hit with sun rays, the energy starts turning into heat on the object. Every human can testify for that, when sitting in the sun and for sometime starts feeling warm.
But not all material that when sun's light hit produces heat, material like silicon, when hit by light produces electric current rather than heat and this is as a result of the electrons in the crystal which undergoes movement when exposed to sun's light, instead of the electrons jiggling in just one place just to make up heat. one reason why silicon isn't used despite its great ability to produce and also convert lots of sunlight to electricity, it is also much expensive.
Materials such as copper-indium-gallium-selenide is a thin film solar cell that can convert sunlight to electricity but not as perfect as that of silicon at turning light into electric power but copper-indium-gallium-selenide is a cheap crystal. For the world to be able to replace fossil fuels with solar cell, they actually need to put in place scientists just to develop materials that massively produce and also convert enormous sunlight to electric power.
First you might be thinking what is solar cell, solar cell is just a device that is made to absorb energy from sunlight and convert them to electric power. Every atom in a crystal are being held together by a bond, like the extrinsic semiconductor ( silicon ) which can be doped just to alter it's properties, which when light gets absorbed, one of its electron gain energy and move to the higher energy level, which result in the electron moving around and as you know, electric current is as a result of moving electrons, so the electron that gain energy will end up producing electric current and with the help of other electronics components added to the system, electricity can be form!.