Don Carson reminds us not to go to the extreme of believing we can so influence God in prayer that we turn him into a genie of our own making:
The…extreme begins with the slogan, “Prayer changes things.” Petitionary prayer is everything. This means that if people die and go to hell, it is because you or I or someone has neglected to pray. Does not Scripture say, “You do not have, because you do not ask God” (James 4:2)? Worship and confession must of course be allotted an appropriate part, but they can reduce to mere self-gratification: it can be fun to worship, a relief to confess your sins. Real work for God, however, demands that we wrestle with God, and cry, with Jacob, “I will not let you go until you bless me” (Gen. 32:26). Not to intercede is to flee your responsibilities as a Christian. Far from being an insult to God, petitionary prayer honors him because he is a God who likes to give his blessings in response to the intercession for his people. In fact, if you agonize in your prayers, fast much, plead the name of Jesus, and spend untold hours at this business of intercession, you cannot help but call down from heaven a vast array of blessings. Of course, if a Christian adopts this line, he or she is in danger of treating prayer much like magic: the right incantations produce the desire effect.
-D.A. Carson, “Lessons from the School of Prayer,” in A Call to Spiritual Reformation: Priorities from Paul and His Prayers, (Grand Rapids, MI: Baker Academic, 1992), p. 30.