Sitting is more efficient.
But pedalling on steep climbs requires good muscles.
By "standing" you are enhancing your pedalling power by the weight of your body.
Having said this some riders are famous for "dancing" on pedals and others for grinding out a steady rhythmn.
Coincidentally I was passed yesterday on a long steep climb by a seated woman and who seemed to be pushing a higher gear than I was (obviously she was much younger than I am).
I felt emasculated and "danced" to the top behind her (being gallant) while she never got out of the saddle. I know I could have passed her but sensed I was using up more energy than she was.