How do solar panels work?

Solar panels work by converting sunlight into DC power. This direct current is then converted to AC household electricity by an inverter.