How do solar panels work?

Solar panels convert sunlight into electricity through photovoltaic cells. When sunlight hits these cells, they generate a direct current (DC) that is converted into alternating current (AC) for use in homes and businesses.