There are generally said to be three reasons for this.
First, the US got involved for economic reasons. Americans felt that taking places like Hawaii and the Philippines would give them new sources of raw materials. It would also give them new markets in which to sell their goods.
Second, Americans wanted to spread their way of life around the globe. They felt that they were superior to other countries and that it would be good to bring things like democracy and (their form of) Christianity to other countries.
Finally, Americans wanted more military power. Alfred Thayer Mahan had argued that sea power was vital to world power. By taking an empire, the US enhanced its sea power by giving it bases around the world.
The United States had reasons for getting involved in imperialism. We knew that to be a world power we needed to have land beyond our borders that we could control. All of the world power countries had colonies beyond their borders. If we wanted to be viewed the same way as the other world powers, we needed to get colonies. The opportunities to gain colonies were dwindling as other countries had already taken most land available for colonization.
Obtaining colonies would provide economic and political advantages for us. If we had colonies, we could get raw materials cheaper from the colonies than we could if we bought them from other countries. We also would have a place where we could sell our products made in our industries. By having colonies, our navy would have places around the world where our ships could refuel and resupply. These colonies could be used as a base for attack in case of war. By having these colonies, it would be easier for our navy to protect our trade. We knew that world power countries must be able to protect their trade.
There were people who believed it was our duty to spread our way of living around the world. They now believed that the concept of Manifest Destiny should be spread beyond our borders. These people believed it was our obligation to spread our superior way of life and culture to other people throughout the world.
When we saw an opening to gain colonies by going to war with Spain, we seized that opportunity. We believed over-exaggerated stories about Spanish mistreatment of the Cubans. We jumped to conclusions that Spain was responsible for the explosion of the U.S.S. Maine. As a result of the Spanish-American War, we gained colonies, became an imperial power, and assumed our place as a world power.
There are three main reasons why the US engaged in imperialism.
- Sources for raw materials, new markets for finished goods. The colonial economic theory of mercantilism explains that a "mother country" sets up a colony that can grow/provide raw materials or goods. Those goods can only be traded back to the mother country. This made mother countries extremely profitable. When the US gained control of new territories, they could not only have access to new goods, but also have new markets to sell its goods.
- Extending power/military reach. By setting up colonies around the globe, the US would have potential military bases that could be used in times or war or conflict. Even today, the US has military bases in sovereign nations around the world. This way, if conflict arises and the US intends of sending in troops, they could pull from the closest available base. This was especially useful during WWII when the US used naval bases in the Pacific (Hawaii, Midway, Guam) to better reach Japan.
- Cultural assimiliation. The US (and European powers) have a long history of wanting to "westernize" cultures. Rudyard Kipling wrote it best in "The White Man's Burden", characterizing cultures in Africa as uncivilized and barbaric, needing of Western humanitarianism and culture.