This may sound strange, but I am from Eastern Europe.
Almost all oil countries have weak economies. Why is it different in Norway? Were there any incidents of corruption in Government Pension Fund of Norway or attempts to steal oil money?
I am sure that somewhere, a historian of Scandinavia is feverishly writing an answer on the history of Norwegian democracy, Norwegian checks and balances, and their role in guaranteeing the effective management of the Norwegian pension fund. In the meantime, I think it might be useful to think of this question from the perspective of histories of institutions. Can this question be approached by trying to understand why some institutions lead to comparatively better outcomes and other institutions have comparatively worse outcomes?
While the short answer to the question is, “Not really and it leads to a lot of arguing” (we are, effectively, working with counterfactuals, which is a very difficult thing to do) those who have tried generally come to similar conclusions: Good institutions will succeed, bad institutions will not succeed. Norway, we can safely say, has effective institutions: Not just its pension funds, but its system of government, social safety net, and relations between key stakeholders like workers, private enterprise, and political as well as non-political associations. This means Norway would probably still be a prosperous country even without its natural resources, even though its economy would be very different. We can make direct comparisons: Sweden, Denmark, and even Finland, who have similar institutional setups and backgrounds to Norway (minus the oil-fueled pension fund) are similarly prosperous countries by western european standards (of course, they like all countries are beset with complicated histories and their own modern problems, but in general terms I think we can agree they these are prosperous countries with successful institutions).
Conversely, countries which are rich in natural resources but are not prosperous are instead often plagued by poor institutions. In other words, in all probability no amount of natural resources would be able to compensate for their institutional shortcomings.
This idea is called “Institutional Development Theory,” and while it’s not exactly a detailed formula that explains everything, it’s the best consensus that academia has come up with.
You might be interested in this related discussion on economic development that I participated in a few years ago, which might shed some light on what generally constitute successful institutions and how they contribute to economic success.