The World Bank has a wide array of high quality data and much of it is open data[. It includes over 15 major databases with more than 2000 indicators.
There are a variety of different databases.
One of the major open ones are the World Development Indicators which provide a variety of important indicators ranging from GDP and population to CO2 emissions and literacy in a standardized cross country form.
The World Bank has a data API. You can use this to access a variety of data including the world developemn
You can get data in CSV, JSON and XML (default).
https://api.worldbank.org/indicator/GC.DOD.TOTL.GD.ZS?format=csv # for some reason json format just yields metadata https://api.worldbank.org/indicator/GC.DOD.TOTL.GD.ZS?format=json
More elaborate queries documented in http://blogs.worldbank.org/opendata/first-steps-in-integrating-open-data: