I am often asked this question by followers of Christ. Blogger Bill Pratt on his blog, Tough Questions Answered, offers a nice, concise answer to this common inquiry.
"The Bible teaches, and theology argues, that God cannot change. This is called divine immutability. But if God cannot change, then why do we pray to him? After all, when we pray, aren’t we trying to change God’s mind?
Norm Geisler answers this question in his Systematic Theology, Volume Two: God, Creation. Listen to what he says:
God is omniscient . . . , and an all-knowing Being cannot change His mind. If He does, He is not really all-knowing. Therefore, God cannot change His mind in answer to prayer.
When we pray (or have prayed), God not only knew what we were going to pray, but He ordained our prayer as a means of accomplishing His purpose. Prayer is not a means by which we change God; it is a means by which God changes us.
Prayer is not a means of our overcoming God’s reluctance; it is a way for God to take hold of our willingness. Prayer is not a means of getting our will done in heaven, but a means of God getting His will done on earth."
You can read more here.
I highly recommend Bill's blog for short, concise answers to tough questions about Christianity and how it relates to science, ethics, philosophy and history.
Courage and Godspeed,