One of the variables as to determining the energy cost in comparison to the energy produced by PV is the angle it is set to the sun. A wrongly set panel will have a lower ratio of energy return than a panel set at 90deg to the sun.
Further info here:
http://www.solarbus.org/documents/pvpayback.pdf
It is thought that one of the reasons this idea is circulated about more energy than it produces comes about is from NASA satellites. They don't have to worry about such matters, as performance is more important in such environments. But for Earth bound panels, its a different story.
There is of course a carbon cost with every energy source, and PV doesn't come out on top, but that doesn't mean it should be avoided. It does have many applications where wind or any other renewable would be inappropriate.