I was talking to a family friend, who made the point that when the british withdrew from their colonies, they left behind better functioning governments than other european powers, and as a result had a better quality of life. Is there a historical basis to this?
It's convenient to look at a few, obviously very successful countries that are former British colonies, and then expect them all to function so well. The reality is a bit more murky, and the differences largely stem more from the type of colonists and colonies rather than any inherent differences in the actual governing structure of the home country. This is largely borne out in Sub-Saharan Africa, where the majority of former colonial possessions of all countries share roughly similar fates across the board.
Now, I mention the types of colonies and colonists. What I mean by this is pretty simply borne out in North and South America. Let's compare the three major colonial territories of North America first since it is rather convenient. We have New France (Quebec), the Thirteen Colonies (UK), and New Spain (Mexico). New France and the Thirteen Colonies share a lot of similarities, as the core of these new states were small holder farmers and traders. New France was a little bit different, as it utilized the seigneurial system, which was somewhat of a lord/peasant system as opposed to the freehold farmers in the UK colonies. However, despite the difference in exact implementation, these colonies share two main similarities that make them distinct from the other North American colonies: they were based on similar systems of governance that existed in the home countries, and the majority of subjects within the colonies were emigrants from those countries and their descendants. This meant that cities and particularly infrastructure to support the farmers (a key component of the seigneurial system) were much more advanced than in other colonies. Indeed, in a very real way these colonies ended up often having very comparable levels of development as they matured as their home countries, if over very select pieces of geography. Anyone who has visited Montreal or Quebec City can see how developed New France was, while in cities like Boston a great deal of the colonial infrastructure survives as well. In this sense, these places were extensions of the home country. One of the darker side effects of this, however, was that native populations were not included in these societies for the most part.
Compare this situation to New Spain. where an entirely different system developed. Unlike New France or the Thirteen Colonies, this was not a society based on freehold farming and importation of the Old World into the New, but rather an exploitative economic system based on wealth extraction rather than wealth creation by colonists. While there is no doubt significant investment was made in parts of New Spain in places like Mexico City, for the most part this colony, particularly its early history, shares a lot more with most of the other colonies in the New World. These extraction based colonies are the most common. In the case of New Spain, real investment in infrastructure and attempts to turn it into a more 'farmer' based economy largely didn't start until much later than in New France or the Thirteen Colonies, and it was largely driven by a very small elite in a large population of indigenous peoples. This is, in fact, one of the primary traits of most of the colonies in the world: a small band of elite land-owners concentrating wealth and power in their hands, particularly at the expense of indigenous peoples and, of course, slaves. Mexico and Brazil are quite similar in this regard, as both had relatively high levels of European settlement in comparison to other 'extractive' colonies, which might explain their relatively high wealth in comparison to other colonies of this type. Even so, the investment was often highly localized.
So, we can roughly lump the colonies of the world into two main catagories: colonies of settlers, and colonies of extractors. Now, the UK looks pretty good if you only think of the major countries they used to own: Canada, Australia, New Zealand, and the United States. All very much settler colonies, all very wealthy. However, the UK also has a whole bunch of extractor colonies: the Caribbean colonies, India, and most of the Africa colonies. The Caribbean provides us with a pretty good way to compare the governance of the European powers with relatively equal conditions, as pretty much all of them treated their Caribbean colonies as offshore sugar plantations, all utilized obscene levels of slave labour, etc. Here is a ranked list of Caribbean countries by GDP (PPP) with the former colonial master in (brackets). For comparison, I've also included current dependencies of the colonial nations in italics.
So what are the conclusions we can draw from this. Well, you'll notice that both the top and bottom of this list are dominated by current and former colonies of the UK. I think this should, at the very least, dispel the myth that the UK was inherently better as a colonial master. There is also something to be said for the effect of remaining under European administration, although going into more detail would break the twenty year rule of this subreddit. What I will say though is that, one thing that is almost universally true is that the more investment in the colony the more likely it would grow to have a higher standard of living. The countries on the bottom of this list were ones that suffered the most exploitation and lack of investment, aka extractive economies. Haiti is a particularly good example of this, as they achieved independence relatively early from the exctractive model, but still had no real source of foreign investment to build up their standard of living in the intervening years.
I hope this answer helps dispel the notion that the UK was some sort of inherently better governor. It is important to note that the dichotomy between settler and extractive colonies is not a black/white one. Countries like Mexico, Brazil, and South Africa all represent a balance between these two sides, and not coincidentally, also represent middle-income countries that suffer a lot of the same problems that extractive colonies like the Caribbean ones above have. Much of the African Colonies of all the European powers fall somewhere between these two points of the graph, with most leaning towards the extractive side. Settlement did occur, but most of these colonies existed for less than a century, limiting what settlement could occur. This is not an endorsement that if African countries just let themselves be settled they would be better off today, because as I noted above, the settled countries were not inclusive to aboriginal populations, even if they weren't outright hostile to them (New France had a cordial relationship with aboriginals for example, but didn't include them). So, if they followed the same pattern of settlement in other places, the overall wealth might have been higher, but the wealth of indigenous populations would not necessarily been better. This was largely borne out in South Africa and Rhodesia/Zimbabwe. In this regard, the most similar situation would be Mexico, were wealth was highly concentrated and localized, one of the reasons governing the independent country turned out to be so difficult.