A simple, conventional answer may be that we pray because our forefathers have been praying and told us to pray, just as we tell our children to pray. Or that we pray because God has asked us to pray. But for many people who are sincerely searching for a more meaningful answer, this may not be satisfactory. First of all, God has given us freedom of choice for everything, including prayer. So we do not have to pray if we do not want to. In fact, in good times, most of us don't. Only when some personal tragedy strikes or when we reach old age that many of us start praying regularly. For example, consider a plane full of people about to crash. In this helpless situation, every one will be praying for life and survival. If the situation seems completely hopeless, and they realize that they are going to loose their lives, people will be praying for God's mercy, forgiveness, His pleasure, and personal salvation in the hereafter. But nevertheless, everyone will be trying his/her best to survive until the very end. This instinct of self-survival is inherent in every living being, including humans. Other beings have defense mechanisms given by God for their survival.
But humans find themselves helpless and defenseless against many living beings and natural catastrophes.Naturally primitive man tried to pray to them, as he had not developed tools for self-defense. He prayed to various natural objects that threatened or benefited his survival. When human beings developed tools for self-defense and gradually advanced in science,they tended to drift away from religion.They found security in science rather than prayer because science gave them control over the forces of nature. Priesthood considered this attitude as an attack on religion itself. This led to a continuous battle of religion with science. History bears ample testimony to this continuous struggle. A classic example of this is the battle of creation versus evolution. But this is a whole new topic.
Thus we see that there seems to be no single reason as to why people pray. Everyone can come up with his or her own answer and feel satisfied. In fact, this is what we normally do. But as we mentioned before, the answer that transcends space,time,circumstance and human emotion can only come from God which means His book, the Quran.