Britain had the material wherewithall to hold most of the Empire after WW2, the problem mostly comes down to politics. Of course, the greater Britain's relative economic strength, the more that economic strength compensates for political screw-ups, but then again, most of the PoDs to change Britain's economic situation post-war are political as well.
So politics, politics and politics.
I really get tired seeing the US blamed for British decline. Yes, lend-lease and the subsequent Marshal plan undermined sterling as an international currency, yes, the US undermined Britain in the Middle East, pushing them out of valuable oil monopolies so America could monopolize various important oil deposits themselves and yes, the US was busy wooing the British Dominions away from Britain and into America-centric alliances... But the truth is, America really offered Britain good terms on the aid given to the country and where we might legitimately complain about the terms of a deal (the technology sharing deals during WW2 come to mind) most of the areas of complaint were pushed by the British negotiators. Also, Britain, like the Soviet Union, was under no obligation to cooperate with American attempts to undermine their Empire.
So what sort of political changes are needed?
1) First and foremost, there needs to be a wide political consensus that the Empire is good and worth fighting for.
2) You need to have support for Imperial federation. The lack of this was a big weakness of British imperialism since without a willingness to share power with the people and governments of those parts of the Empire with Dominion status (let alone a willingness to integrate as equals with the brown people in the colonies) meant that the British could not offer much to the pro-Commonwealth leaders of the colonies and dominions so that they could then go to their people and say: "it is to our advantage to cultivate a close relation with Britain". Westminster wanted to keep all the power to itself right up until they didn't have enough power to outbid the Americans. As a result, they lost everything.
3) You need support for much higher military spending. This gives you 4 things:
3a) Britain can offer security to her colonies and dominions.
3b) Britain can help put down any revolts against legitimate Commonwealth governments.
3c) Britain continues to deal with the USA and the Soviets as a fellow superpower, meaning neither gets to fresh about British interests.
3d) Bigger military means more military production - this allows Britain to also continue to be able to meet the orders of foreign militaries - OTL British arms sales collapsed, mostly got replaced by American competitors and countries which were buying American generally drifted into closer alliances with America (if nothing else, to ensure they weren't cut off from critical supplies in the event of things getting dicey).
There are then a few things that I don't think are necessary, but would certainly help a strong Commonwealth to evolve:
1) Britain abandons the desire to keep Sterling as an international currency. Basically, Britain destroyed her industrial economy by making the maintenance of a strong Sterling the center of her industrial policy. It didn't work. As a result, Britain lost most of her relative industrial advantage, lost her status as an exporter nation, drove up unemployment, drove up domestic poverty, ended up with an over-developed banking industry (further hobbling her industrial output) and lost Sterling's position as an international currency anyway. Basically, there's no way Sterling can compete with the dollar, so Britain would have done much better to copy the French and throw the currency under the bus to focus on industrial advancement.
2) Britain doesn't care about cultivating particularly close ties with the US. Since the US is by far the largest threat to Britain maintaining a tight-knit Commonwealth as well as the power able to offer the greatest positive temptations to pull Britain and the Dominions out of a close relationship with each-other.
3) Britain somehow ends up putting together a much more threadbare welfare state, leaving more government money for science and the military. (This one is pretty close to ASB though.)
4) Union with France. A Franco-British union makes for a pretty strong core of a Franco-British Commonwealth and it also has a chance of torpedoing the EU, which was another major temptation that pulled Britain away from the Commonwealth in OTL.
5) Closer relations with the Soviet Union. Less fear of the Soviet Union means less of a feeling that Britain needs a close alliance with the US at all costs. A friendship with the Soviet Union means less danger that Communists threaten the stability of the poorer areas of the Commonwealth.
I have to say, Britain managing a close federation with the Dominions and the bulk of the African and Asian colonies is very interesting. The Commonwealth was at all points in history stronger than the Soviet Union and would be able to stand as a legitimate 3rd superpower if it wanted to. A TL where the Commonwealth DID want to stand apart from the US, and we ended up with a 3-pole Cold War would be VERY interesting. I also wonder what sort of ideology such a Commonwealth would have? Some sort of worship of Queen, tea and jingo?
fasquardon