Wrong comparison.
Solar panels aren't about net generation of energy. Solar panels are about delivering energy where it is needed. Power grids consume a lot more energy than they eventually deliver to the load - starting with the carnot cycle losses: about three watts of heat "wasted" for every watt generated just from running a fuel-driven power plant, which is a heat engine. But you don't hear people complaining about efficiencies that don't beat 100%, do you?
The right comparison is between the building and instalation of the panel vs. stringing a power line (cutting down trees, mining ores, processing them into poles, wire, transformers, insulators, a power meter, and the load's fraction of a power plant, shipping them to the site, clearing the right-of-way, and driving workers to-and-from the site until the install is done) PLUS all the fuel burned to generate the grid power. Any bets on whether just melting the steel and copper for the pole transformer uses more energy than manufacturing a house's worth of panels?
The right comparison is also not energy, but the COST of construction (which takes into account energy, other resources (such as land tied up in rights-of-way), pollution, lost opportunity, generation and transmission efficiency, and everything else of value to people). It also takes into account things like energy being used more efficiently in large plants than in small ones, near mines than far from them, and so on.
And of course you don't use expensive high-quality electrical energy, such as that produced by solar panels, to melt and refine the glass and metal used to make them. Using that for heating (the main energy use in manufacturing) is horribly inefficient. If you were going to solar-power such fabrication steps you'd use mirrors - just as you use fuel directly rather than wasting most of it to generate electrical power and using the power for heating. (Except for the final zone refining of silicon, of course, where control and avoidance of conatmination trumps generation inefficiencies.)
Having said that, I hear the claim of energy costs in excess of generation are from earlier generations of panels and that modern panels, over their lifetime, generate significantly more energy than it took to make them.
(I've done a post like this once before. I should file it for the next time the question comes up. B-) )