Solar panels harness the photoelectric effect to produce electricity from sunlight. Thousands of photovoltaic cells made primarily of silicon, along with additives like phosphorus, are connected together in solar panels to convert light into direct current electricity. While solar energy is one of the most abundant renewable resources, solar panels do not generate power at night without sunlight, but batteries can store excess energy from daylight hours for use when the sun is down.