Over time, solar panels produce more energy than they take to build.
Once a solar panel system is built, it doesn't take any energy to operate. But the photovoltaic systems do take energy to manufacture them, so it's useful to measure their "energy payback." A federal laboratory defines that as "how long a PV system must operate to recover the energy—and associated generation of pollution and CO2—that went into making the system in the first place."
An Environmental Science & Technology study finds that most solar panels' energy payback is 4 years or less. Assuming a likely 30-year system life, the panels will provide a net gain of at least 26 years.
The study also finds that as the technology continues to improve the payback period will continue to decrease.