This is an incredibly complicated question.
First, you have to distinguish between British colonies. It's only white settler colonies like the US, Canada, Australia and to a lesser extent South Africa that became 'first world countries' as unambiguously as you claim.
For these, the important thing is networks of investment and information. Britain in the 19th century was the world's biggest source of capital. It funded the world's railroads and steel factories for the most part. In places like Argentina and India, British capital built these things without employing skilled local labor. In white settler colonies that had ties of migration, and the perception of shared culture, it was much more likely for industrialization to build up local human capital as well. (Sources: Belich, Replenishing the Earth, Potter News and the British World, Magee and Thompson Empire and Globalisation)
But Britain had a TON more colonies than just white settler colonies, and it's not clear that British colonization was helpful for their development. Parthasarathi in Why Europe Grew Rich and Asia Did Not argues quite forcefully that British colonization wiped out an important base of social capital that could have helped India develop itself. The vast majority of the subjects of the British Empire in Africa, China, India and Australia were probably NOT helped by British colonialism.
There's another set of explanations that use regression analysis to look at the comparative outcomes of colonized countries. This suggests that missionary protestantism is a main cause of economic and political development because it creates social capital, associations, and literacy. I can't evaluate this argument because it's in my to-read pile. See Robert Woodberry, the Missionary Roots of Liberal Democracy.
Finally, your characterization of Spanish colonies as 'poor and full of crime for the most part' is wrong. If you're actually curious about the comparative development of Spanish and British North American Empires, Elliot Empires of the Atlantic World is a great primer.