The Cow - 2:177
It is not good that you turn your faces towards the east or the west. The righteous are those who believe in Allah, the Last Day, the angels, the Book and the Prophets, and they give freely to relatives, orphans, the needy, the stranded, the beggars, and to free the slaves, and they observe the prayer, and pay the zakat, and keep their word when they contract, and they resist hardship, distress and oppression. It is they who are the righteous, and it is they who are the virtuous.
The intention is to turn to Allah in prayer and supplication:
The Cow/2:115
To Allah belongs the east and the west. Wherever you turn, there is the face of Allah. Allah is all-encompassing and all-knowing.
The Cow/2:149
Wherever you set out, you should turn your face towards the Holy Mosque (for prayer). This is surely a truth from your Lord. Allah is not unaware of anything you do.