Solar panels are made up of many solar cells, which contain semiconductor materials like silicon. When sunlight hits these cells, it excites the electrons, creating an electric current. This direct current (DC) electricity is then converted to alternating current (AC) by an inverter for use in homes and businesses.