A solar cell generates electricity by converting sunlight into electricity through the photovoltaic effect. When sunlight hits the cell, it excites electrons in the cell, creating a flow of electricity.\n
How does a solar cell generate electricity?