Solar panels comprise of lots of small units called photovoltaic cells which convert sunlight into electricity. A solar panel allows particles of light (photons) to free electrons from atoms, generating a flow of electricity.