My GM told me that if you wear armour it weighs half as much as if you carry it. Is this part of the official Pathfinder rules, or is it a houserule?
The only figure I can find for half weight in the pathfinder source reference document is about armor fit for small creatures (which is smaller to start with and thus weights half as much as a medium-sized one).
No official rule exists to my knowledge about halving weight by donning armor (and I'd be surprised if it existed).
As SevenSidedDie points out, that rule used to exist on AD&D, and I suspect D&D 3.x got rid of it when they introduced load equivalents for wearing medium and heavy armor. Wearing armor is still more cumbersome than just having it in the backpack, but not because of weight variations.
(On a side note, it looks like D&D 3.x smiths are unable to craft decent-fitting armors. Since they weight the same and they're better balanced when worn, they must limit your movements because they are bulky and uncomfortable to wear.)
The only logical answer I can conceive is that an armor's effective weight is reduced due to being worn over a large area of the body and thus spread out fairly evenly and thus for the purposes of encumbrance would be treated as half weight compared to holding it in a large bag slung over one shoulder.