Brazil, upon securing its independence from Portugal, seems much like the United States. Both countries could probably be considered the strongest independent forces in their respective regions. Both countries were on the Atlantic coast. Both countries had vast amounts of natural resources. Both countries had obstacles to western expansion, the Rockies and Amazon, respectively. Both countries were safe from European aggression or meddling. Both countries seem every very similar. So, what was the difference that caused Brazil not to be just as powerful as the United States?
A nitpick: you can observe from Maddison's figures that when Brazil obtained independence the 1820s, it was already dramatically poorer than the United States, with Maddison estimating it to have half the population and (atop that) half the GDP per capita (this is including estimates for native populations and other colonies in the modern borders of Brazil and the US).
At $646 this is basically in the ballpark of Maddison's estimates for China (600), Japan (669), and Indonesia (612) per capita GDP in 1990$ in 1820 (for context: US 1257, France 1230, UK 1707). The US was already well into industrial takeoff. Brazil would roughly take another century to reach the level of per capita output that the US had in 1820.
(The World Economy, A Millenial Perspective. Don't take the exact numbers too seriously, they are estimates warped by additional purchasing power estimates)
That's a very good question and one that has been asked several times by scholars, especially in Brazil. A short answer on Reddit wouldn't do justice for such a complex question.
Vianna Moog, a Brazilian sociologist who lived in the US for several years during the 1940s and 1950s, wrote an amazing book on this subject, "Bandeirantes and Pioneers." Here's a review on his book that summarizes his argument answering your question: http://onlinelibrary.wiley.com/doi/10.1525/aa.1964.66.5.02a00740/pdf
As has been mentioned already, the success of the US, and perhaps more so, the relative lack of success of Brazil, are complex and debated subjects, and hard to do any justice to here. Here's an attempt though. The TL:DR version of this is: they were and are very different countries.
Geography
To start with the facts of geography. Although both countries have wide variations, the US is generally a temperate country, while Brazil is a tropical one. European plants, animals and people do better in the US than in Brazil. Where European agriculture thrives it's much easier to displace the natives and implant European-style societies.
It's important to note that rainforest soils are actually poor soils (the nutrients of the ecosystem are in the plants). So when cleared, rainforests are not particularly good for most types of agriculture. The jungles of Brazil made communications and development considerably harder than the plains, or even the forests, of North America.
Both countries do have tremendous mineral resources. Brazil's were exploited earlier than those of the US. This sounds like an advantage, but as we'll see, it's not.
It's also hard to view the Rockies and the Amazon as 'obstacles' in the same way. If you go past the Rockies you reach the tremendously fertile and valuable areas of California and the Pacific North-West. And - of psychological importance in the short-term and massive economic importance in the long-term - the Pacific. Also important was that the North-West was inhabited only by Native tribes, while in the South-West Mexico was a relatively weak adversary.
If you go past the Amazon, you find... more Amazon. And then already established European colonies like Bolivia and Peru whom it was less acceptable and more challenging to dispossess.
Economy
As /u/threels has mentioned, in the 1820s, Brazilian GDP/capita was much lower than that of the US. Simply put, Brazil was poorer and much less developed than the US.
Brazil's economy was dominated by primary products - sugar, minerals, and suchlike. Like many colonial powers, Portugal saw Brazil as a provider of primary products, while the home country produced higher-value manufactured goods. An unequal exchange with Brazil was vitally important for Portugal's shaky economic position. Portuguese laws restricted industrial development in Brazil.
Even following independence, primary commodities shaped Brazil's society and economy. Without going into the details, for societies producing valuable primary commodities, industrialisation often seems economically irrational in the short term, and at the same time, it challenges the position and values of local elites (and even the general population).
The US had less economic significance for the UK. It did not produce valuable primary commodities in large quantities. (The South is a partial exception, and in this arguably are the seeds of the Civil War.) It was not essential for the UK to control the economy of the US, and it was allowed to develop much more freely. Britain also had more capital to invest in the US than Portugal in Brazil.
Society and Politics
I hope it's not romanticising too much to say that the United States had a good political inheritance. At least compared to many other contemporary states, Britain had a reasonably competent, moderate and democratic government. Colonial society developed its own strong traditions of politics and local government that could act as a framework for the new nation. It benefited tremendously from the comparatively high standard of living and education in the country. The US did not have the same poverty stricken masses that many countries did. Also, perhaps controversially, it was a racially segregated society - native americans and black people were excluded - giving its society and polity homogeneity. In the short term at least, this was beneficial for it. (Though obviously not so beneficial for those excluded.)
Brazil did not have this same economic situation or political inheritance. It was also a more mixed society, interpenetrated by native indians, mulattos, mestizos and other racial or social categories. You might argue that this, and its Iberian history placed Brazil outside the stream of Northern European culture and politics that dominated the 19th century. Meanwhile, all sorts of exchange between Britain (and later other Northern European countries) and the US were relatively easy.
External relations
Although it lost the US War of Independence, Britain went on to establish itself as the world's pre-eminent industrial, military and political power. In the 19th century Portugal slid into irrelevance in world affairs. We can infer from this that the US won its independence through its own strength while Brazil won its because of Portugal's weakness.
In fact, a key factor in Brazil's independence was the attitude of Britain. It's very wrong to say Brazil was "safe from European aggression or meddling." In fact it went from a colonial relationship with Portugal to a neocolonial one with Britain. British merchant shipping and trade was vital to Brazil. The Royal Navy patrolled the waters off its coast. When it began interdicting slave shipments there was nothing Brazil could do. It was British pressure that, very belatedly forced Brazil to (at least de jure) abolish slavery. The UK held the whip hand in Brazil's politics and economics. And as long as they benefited from that, Brazilian elites didn't necessarily mind.
The US was in the fortunate position of having only two land borders (aside from Louisiana). One was with Canada, and while this wasn't always peaceful, it wasn't too hotly contested, and relations between the UK and US didn't take long to stabilise. The other was with Mexico, and the sparsely populated and often barely claimed northern regions of this relatively weak country were easy to annex, to the great benefit of the US. Brazil's more numerous neighbours offered no such easy opportunities - indeed Argentina was wealthier and a serious rival. Even small and underdeveloped Paraguay went down fighting in a war that cost over 70,000 Brazilian casualties (and the lives, from war and disease of maybe 2/3 of its population).
I hope I've not forgotten anything vital in there. Sources are eclectic; I'd suggest a primer on modern Brazilian or Latin American History (the one I've read is Modern Latin America by Skidmore & Smith). I've also drawn on Hannah Arendt's On Revolution, but you could probably do much better asking for some specific recommendations about this period of US history (which I haven't studied). Also a shout out to Ecological Imperialism by Alfred W Crosby for the importance of ecological factors.