In terms of preventing endemic starvation, high prevalence of disease and widespread extreme violence - very obviously yes.
But, overall, not.
When it began there were two distinct reasons for colonialization (I mean distinct in terms of logic - although they were and are often conflated): Christian mission and economic exploitation.
When it began, colonialism was either Christian, or economic exploitation, or both.
What confused Christianity and economic expolitation was humanitarianism: people thought that humanitarian goals were the same thing as Christian goals - for example they imagined that the abolition of slavery was both and equally Christian and humanitarian; and abolition generally required invasion and imposition of British rule.
Yet by the time it ended, colonialism was clearly working mostly for the material benefit of the colonized; as is obvious from what happened afterwards. And when combined with the catastrophic decline of Christianity in Britain, this made colonialism unsustainable - there was nothing in it for the Brits.
Because the only valid justification for 'colonialism' was Christian mission; and for mission 'humanitarianism' is a stalking-horse for secular Leftism.
Also, the resentment of local elites in colonized countries at their second class status meant that no matter what the material benefits of British colonialism for the mass of people (benefits like having enough to eat, and not being mutilated, raped and murdered) these were trumped by 'Nationalism': the glorious freedom of being starved and violated by people of your own kind.
If you are unconvinced that Leftism is evil in its essence, the primary strategic activity of purposive evil in the world, then consider their unconditional approval of third world 'nationalism' and their absolute hatred of colonialism.
Leftism (being atheist, and denying spiritual realities and aims) purports to be driven by a simple, basic imperative to alleviate human suffering, yet the reality is that Leftism works to blind itself to the most blatant suffering and its obvious causes.
From the purportedly-Leftist perspective of alleviating suffering, colonialism is so obviously superior to the results of ethnic nationalism, that even to question which is better would be obscene. Yet from the actual Leftist perspective the opposite is true: it is colonialism that is the obscenity.
But the fact that this is not how people see things is solid data - I take it as indirect evidence that the material world is subordinated to the unseen spiritual warfare of of Good and evil.
If the material were primary, then then ex-colonies would have been begging for colonialism to continue, while the British firmly moved to extricate themselves from their obligations.
What we actually observe is almost the opposite - and the British continue to inject resources into ex-colonies but this time with the outcome of supporting and amplifying Nationalist elites who are agents for inflicting extreme material suffering on their populations.
This has had results which have at times approached being the worst of all possible worlds.
Humanitarian colonialism is an oxymoron: there is no such thing.
Indeed, colonialism is a bad thing.
If the colonialism is bad by intention (exploitative) then it is a bad thing; but if colonialism is good by intention (humanitarian), then it is also a bad thing.
Yet Christian Empire has often been a Good Thing - sometimes overall a very good thing... Christian Rome, Byzantium, perhaps the Holy Roman Empire.
I conclude that only if the goals are spiritual can colonialism be justified: the British Empire was tainted from its origin.
Because the example of the British Empire teaches us that no amount of material benefit, and no matter how obvious is that material benefit, can ever justify colonialism in the eyes of human beings as human beings are presently constituted.
Empires may be good when they are primarily Christian; but no material empire is ever good.
Because even when successful (as was the British Empire) it ends-up in the paradoxical state of coercively-imposing peace, comfort and prosperity on people who idealistically agitate for an autonomous state of continuous civil war, degradation and poverty.