When solar panels are exposed to sunlight, solar energy is converted into electrical energy. Photons from solar radiation are absorbed by the semiconductor material, resulting in the release of electrons. An important role is played by the inverter, which converts the direct current energy produced by the solar panels into alternating current. The energy produced by solar panels can be used for electricity, sold, or fed into the distribution network if more is produced than needed for personal use.