There are many possible ways to answer this question. We might possibly say that this expansion was caused by:
- Immigration. As more people came to the US, there was more demand for land and more pressure to expand the territory of the country.
- Military might. The expansion in the 1840s came mostly through the Mexican-American War. This war was won largely through the military power of the US.
- Ideology. In many ways, the expansion was caused by Americans' ideas about their country and its place in the world. This is the time in which the term "Manifest Destiny" was coined. This was the idea that the US was destined by God to expand its territory. The idea was that the US was so superior (in terms of society, religion and government) that it deserved to take territory from more "backwards" people such as the Indians and the Mexicans. This motivated America to push to expand its territory and made it feel it had the right to do so.
Of these, I would argue that ideology is the best answer. This was the force that made American leaders actually go out and fight the war with Mexico. Belief in Manifest Destiny was the major impetus behind this expansion.
To add on:
California Gold Rush started in 1848 and had a major escalation in population in 1849. They used the rising population to apply to become a U.S. state.