Simply put, a solar panel works by allowing photons, or particles of light, to knock electrons free from atoms, generating a flow of electricity. Solar panels actually comprise many, smaller units called photovoltaic cells. (Photovoltaic simply means they convert sunlight into electricity.)