We all know that solar panels gather energy from the sun, but how exactly does it work? In the simplest of terms, when ultraviolet rays from the sun hit a solar cell, those particles of light knock electrons free from atoms which generates a flow of electricity. This electricity is either used by a source, stored in a battery, or distributed throughout an electrical grid. To summarize; the light particles from the sun that hit the earth are so powerful that they can knock electrons from an atomic structure and solar panels are able to harness that energy from the sun.