Why did revolutions break out in Spain's colonies in the early 1800s?
The major powers of Europe fought extensively in the New World over their claimed territories. Spain, Britain, and France had started to establish colonies in both North and South America in the 1500's; by 1800 all three powers had lost control of territory, either to each other or to the colonies themselves, particularly in North America, where the young United States held sway. South America remained particularly Spanish; however, influenced and inspired by the American Revolution, Spanish colonies in South America began to assert independence. The European powers, weakened by the Napoleonic Wars in the early 1800's, could no longer assert colonial control, and South American colonies began to become independent countries. By 1830, this process was mostly complete; during this era the United States, which was the prevailing power in the hemisphere, instituted the Monroe Doctrine to keep Europe out. The United States then began (and continues) to influence the region.
Rise of The American Nation, 3rd ed., Todd & Curti, Harcourt Brace Jovanovich, 1972, pg. 257.
There are a couple of major reasons here.
First, behind all the revolutions in Latin America was the tension between the creoles (people of Spanish blood, but born in America) and the peninsular Spaniards (ones actually born in Spain). The peninsulars looked down on the creoles and also had much more power. This irritated the creoles greatly.
Second: Even though there had been this tension, it never caused a revolution until the early 1800s. The reason it happens then is because Napoleon conquers Spain and deposes the Spanish king. He then puts his own brother on the Spanish throne. At that point, creoles tended to rise up against the new king. They said they were doing it for the benefit of their real king, but mostly they were trying to get more power for themselves and/or become independent of Spain.