What prompted westward expansion in the 1840s?
There are at least two ways to answer this.
For individuals, westward expansion was caused mainly by a desire for a better life. People felt that they could find good farmland where they could prosper. Others, like the Mormons, were looking for a place where they could live in the way they wanted to.
As a nation, westward expansion was caused largely by the idea of Manifest Destiny. There was a sense that God had destined the US to be a continental power. Americans and their leaders felt that the US was superior enough that it deserved to take lands away from Indians and from Mexico.