Solar panels work by converting sunlight into electricity. The panels are made up of solar cells that absorb the energy from the sun and convert it into direct current (DC) electricity. An inverter then converts the DC electricity into alternating current (AC) electricity that can be used to power homes and businesses.