Let me rephrase the question: What made Brazil have a lower economical development than the US over time (just to focus on the two of them)?
During the colonial period, economic data is rare, but we can be sure that economic output was low. Until 1700, both countries were ensnared in mercantilism and basically provided raw materials to London/Lisbon. The industrial revolution was something for the future, small scale farming was dominant and the government was a skeleton that provided few services.
At the time of American independence, the industrial revolution was already relevant, and this provided a good opportunity for early industrialization. There was a booming internal market that was held captive by European manufacture, and independence removed British barriers on American activities.
Compare this to the Brazilian situation: In the XVIII century there was an amazing gold rush in Minas Gerais, but by the end of the century it was going down. The mercantilist limitations were not removed, and there was no incentive to industrial production. The Portuguese crown had a very deliberate policy of not allowing the establishment of "sophisticated" market elements: While a lot of countries were starting discussion around the Wealth of Nations, Brazil had basically no laws to allow capital accumulation in the form of market economy companies, and a population almost entirely illiterate. Printing presses were banned and censors looked at what was imported.
This was not as relevant as you might imagine at the time. Around 1800, Brazil exported 3.8MM pound sterlings and the USA exported 4MM. Their populations were similar (USA 20% higher, with comparable major cities), and both countries relied in their internal market for growth (Brazilian exports represented 15% of the economy).
The 19th century in Brazil would be defined by the results of those early policies. As the world steadily modernized, the country stagnated. Even after the Crown moved to Brazil, the resistance to a market economy with freedom of enterprise was never solved. The thought that only a capable leader (the emperor) could plan the economy and distribute its resources was common at the time. However, due to the long standing (non) education policy, almost everything was informal! The government ditacted everything by looking only at major cities and major interests adjacent to the Crown.
Only when Brazil turned into a republic in 1889, there were laws to allow creation of companies without governmental approval. There was a massive expansion of the formal market (informal until then), which allowed a credit market to form and finance a massive transformation.
From 1889 to 1929, Brazil had one of highest growth rates in the world. Incidentally, their strong position as global supplier of coffee generated revenue for a massively industrialization effort. After 1929 the coffee business went bust, but bumbling between crisis, the country still had an above average growth well into the 1960's.
So, what happened then? Since pretty much forever, Brazil was a country moved by its huge internal market. This played very well for some time after 1929, as the entire world looked inward, but proved to be a strategic mistake after globalization took hold.
Don't think their leaders were being too stupid, the country had some 80 years of very strong growth with this strategy of going in the internal market first. The classic phrase "Brazil is the country of the future" was not a joke. However, after not fostering multinacional companies (when an ever higher part of the global economy was taken by them) AND getting completely destroyed by the petroleum shocks in the 70's, the government was broke and the private sector was weak.
To pay the bill for the crisis, President Figueiredo increased the slice of the government (taxes & inappropriate adjustments for inflation to the workers). The 80's saw a brutal rise in inequality and chronic poor performance. It was so bad that the military dictatorship of the time basically bailed and let the next democratic regime deal with it.
In 1988 Brazil made a new constitution for the democratic regime. Due to historical reasons (mainly the incredible amount of coups, dictators and arbitrary orders), it was very long and included many things as protection against tyranny.
Since then the situation is that anyone with an Econ degree can see the solution to the chronic bad performance is to better integrate the country with the global economy, but that's easier said than done. Some presidents had to deal with this mess left from the 70's, some just didn't have political will or capital to implement relevant constitutional reforms.
So, remember: Brazil has been in a bad spot for a few decades, but for a long time it had incredible growth!
You can read a lot about this in "História da riqueza no Brasil" by Jorge Caldeira, and more relevant statistics are also in "Capital in the XXI Century" by Thomas Piketty