Theologically, one might say that because of the sovereignty of God, “Prayer changes nothing.” (as the late Donald Barnhouse said). We know that God works all things together after the counsel of His own will (Eph. 1:11) so that whether we pray or not God’s purposes will be accomplished. But this involves the mystery of God’s sovereignty and man’s involvement and actions in the plan of God.
The point is, God has chosen in His plan to use our prayers. For this reason, we have many promises or statements like the one in James 5 that says prayer does accomplish things. This is what has been called an antinomy—the existence of two equally valid principles that seem contradictory to man’s finite understanding. So the answer is yes, prayer does change the outcome of things.
God does intervene on the basis of prayer, but again, this is because He has chosen to use our prayers to accomplish His purposes. In addition, prayer is a means of manifesting our faith and dependence on Him, and so of brining glory to Him. One of the chief purposes of prayer is its impact on our own hearts and lives as God uses it to conform us to His will and transform us into His character. It’s a place of fellowship and intimacy, of growth and transformation, of learning His will as one asks, seeks, and knocks at the door of God’s heart, etc.
There is an extended study on prayer in lessons 7 and 8 of Part Two in the ABCs For Christian Growth series on our web site that answers many of these issues in more detail. You’ll find the series in the “Bible Studies / Spiritual Life” section.