In my competitive days (at a reasonable level) I was not a very good climber, at least in a race sense. The most efficient way to climb is on the saddle, using a gear which can go over at around 90+rpm. That way you work away at the climb and don't waste energy. There are some who are all over the place and try to use big gears out of the saddle. Eventually they tend to blow up and lose a lot of ground. Agree with the comment about getting out of the saddle now and again to ease the back, and stretch legs a bit on a long climb, but only for a few revs and never in a bigger gear. On short (less than about 1,000 metres) it's sometimes possible to power climb, still sat down but using a bigger gear, still keeping the revs going - just avoid going into "the red".
The comment about weight on the pedals is not correct - it's power, and whether it's delivered as slow strong pushes or smooth rapid turning of a gear, power (and weight) is what it's all about. Basically, if you can't climb too well, lose some weight and learn to spin a lower gear. The difference will be surprising.