Those shiny solar panels you see everywhere… this is their chance to shine. But how do solar panels work? When the sunlight hits the solar cells on a rooftop solar panel, it converts particles of sunlight (photons) into electrons of direct current (DC) electricity.