Solar panels convert the sun's light into usable solar energy using N-type and P-type semiconductor material. When sunlight is absorbed by these materials, the solar energy knocks electrons loose from their atoms, allowing the electrons to flow through the material to produce electricity.