Prayer works. It's true. It's not a science, but it's true. God answers prayer. However, because it is not a science, some unbelievers claim it doesn't work. Why, if there is a God who answers prayer, doesn't every prayer come true in exactly the way it was prayed? Even a Christian, asking with pure motives, cannot turn the Earth into Heaven.
And we know this. We live in a fallen world, filled with horrors of many descriptions. Death, disease, famine, natural disasters, violence, accidents, hospitals filled to capacity. There is so much evil in this world, and no amount of prayer will stop it. Why?
What we have here is a pincer maneuver from the unbeliever. On the one claw, we have the classic problem of evil. On the other claw, we have the equally classic misunderstanding of prayer; what it is, and how it's supposed to work. Combining these is supposed to cause a rather nasty, preferably fatal injury to the Christian faith, and maybe even Theism as a whole.
The answer to the problem of evil, however, is fairly simple (and has been answered so many times throughout history, it has long since ceased to be a good argument). In one word, the answer is sin. In more words, the answer is that originally, the world God created was very good. And that's His words (Genesis 1:31). Keep in mind also, God's works are perfect (Deuteronomy 32:4), meaning when He finished the creation, declared it "very good", and rested on the 7th day, that was the literal best this creation could have been. It could be changed into a different form of perfection, but it could not have been improved upon.
At that point in time, death was merely a hypothetical concept. Things like plants could still "die", but only because they're not actually living. There was no death of anything with a soul. Nor was there disease. Even the aforementioned plants did not have thorns (Genesis 3:17-19), and everything, from the tiny beetle to the gigantic dinosaur, ate them (Genesis 1:30). There was no disease. There were no accidents. No violence. No natural disasters. Nothing that would make Adam, nor Eve, look and say, with anything less than absolute awe, "why, God?" "Why, God, did you make the flowers so beautiful?", perhaps. But never "why, God, did you make me blind?"
But then why does God make people blind? Or the other large number of trials and tribulations faced by our kind on a daily basis? Because it didn't stay that way. See, one of the good things God included within His creation is free will. Free will makes living beings vastly superior to automatons. A good choice, made by choice, is far greater than a good choice made by compulsion. It's like the difference between an automatic door, and a kind person who holds it for you. You thank the person for their choice, but not the door which had no choice.
The result? The first human couple made a choice for evil. In spite of God's warnings that disobedience would lead to death, they disobeyed, and God delivered on His promise. This whole creation was cursed, with God's many blessings removed, and many horrible things brought in. This punishment stays with us, not only because the curse upon creation outlived Adam, but because we repeat his error. We sin. Every single one of us. Thus, while it's not as simple as "God sent a meteor to wipe out the dinosaurs and the homosexuals", the simplest answer to "why is there so much evil in a world made by the Good God" is because we, as evil beings, live in the world made by the Good God.
But the Bible says God loves us. It even says He loves the wicked and righteous alike (Matthew 5:43-48). So, why doesn't prayer sort all of this out? After all, He promises prayer works, right? And as Christians, we all claim He answers our prayers. So why doesn't He answer all of them?
Much like us, God has free will. It's why prayer can't be put down to a science. Science requires predictability. If I drop this ball from this height, it will hit the floor in this time. If I heat the water this much, it will start boiling. If I mold this putty into this shape, it will float. These are all things that work precisely because they do not have free will. But God does. Thus, "if I pray this way...", God can answer however He sees fit. Just as you or I might answer a request from another person in any way we see fit.
Now, there are things God tells us about how to convince Him to answer. He responds more favorably to faith, and less favorably to dubious motives. That doesn't mean He is guaranteed to answer a certain way, He has a choice, but these are things He tells us He responds to.
But ultimately, God has an agenda. And when we look at prayer throughout Scripture, we see how this is the most critical aspect of it. Yes, He cares, He will heed the faithful requests of His children, He gives wisdom liberally so long as it is asked for etc. But even when Christ Himself prayed "O My Father, if it is possible, let this cup pass from Me...", He followed it up with "...nevertheless, not as I will, but as You will." (Matthew 26:39-42).
What is this cup which Christ wills to pass from Him? All the curse of Genesis 3. The cup that He was about to drink was not a literal cup, but rather, the sins of the whole world. Jesus was about to die the most agonising death, not merely physical death, but the conscious awareness that God Himself had forsaken Him. Now, knowing He was about to receive the full wrath of God owed to mankind for our sin, He was quite understandably a bit nervous. I personally wouldn't want to spend 5 minutes on the cross, but Jesus was about to die there. So He prayed, even knowing this request wasn't going to be answered, and submitted Himself to His Father's will.
That is something He will always do. From the virgin conception to the cross, Jesus obeyed. And when we pray to Him, we must be conscious of this, too, simply because God still has an ultimate agenda. Now, be grateful, no one is ever required to face the wrath of God again. Christ did that once for all, and is indeed the only candidate who ever could have. But Scripture tells us that we may be called upon to suffer. And this will advance His agenda.
Note that this doesn't mean if, for example, you get cancer, God just wants you to get cancer for His own amusement. In fact, Scripture tells us He does not willingly grieve or afflict the children of men (Lamentations 3:33). In fact, when you factor in the doctrine of the Trinity, what you see with Christ's aforementioned prayer is that God both willed for the crucifixion to happen, and simultaneously very much willed for it not to. It is love for us that caused the former to win out. Temporary pain for everlasting gain.
When Christians suffer, God suffers with us. When people grieve, God is grieved. But it's all for the same agenda. Heaven's agenda. Everything that happens here on Earth leads up to the eternal Kingdom. Note what Christ says in Matthew 6:19-21: "“Do not lay up for yourselves treasures on earth, where moth and rust destroy and where thieves break in and steal; but lay up for yourselves treasures in heaven, where neither moth nor rust destroys and where thieves do not break in and steal. For where your treasure is, there your heart will be also."
What's He saying here? He's saying look, these things here perish. You don't bring anything into this world, you can't take anything out either. Moths eat your clothes. Rust destroys your homes. Thieves take your valuables. Not so in the Kingdom. So look to the Kingdom. Work for the Kingdom. Pursue the Kingdom.
Now, where's the logic in saying all that, then getting rid of all the bad things He uses to point us to the Kingdom? If His goal is to take our hearts from this Earth to Heaven, why would He take Heaven and send it down to Earth in any form but Christ? It's like telling us to look at the signs on the road, then taking away the signs.
We see this clearly in John 6. Read verses 26-41: Jesus answered them and said, “Most assuredly, I say to you, you seek Me, not because you saw the signs, but because you ate of the loaves and were filled. Do not labor for the food which perishes, but for the food which endures to everlasting life, which the Son of Man will give you, because God the Father has set His seal on Him.” Then they said to Him, “What shall we do, that we may work the works of God?” Jesus answered and said to them, “This is the work of God, that you believe in Him whom He sent.” Therefore they said to Him, “What sign will You perform then, that we may see it and believe You? What work will You do? Our fathers ate the manna in the desert; as it is written, ‘He gave them bread from heaven to eat.’ ” Then Jesus said to them, “Most assuredly, I say to you, Moses did not give you the bread from heaven, but My Father gives you the true bread from heaven. For the bread of God is He who comes down from heaven and gives life to the world.” Then they said to Him, “Lord, give us this bread always.” And Jesus said to them, “I am the bread of life. He who comes to Me shall never hunger, and he who believes in Me shall never thirst. But I said to you that you have seen Me and yet do not believe. All that the Father gives Me will come to Me, and the one who comes to Me I will by no means cast out. For I have come down from heaven, not to do My own will, but the will of Him who sent Me. This is the will of the Father who sent Me, that of all He has given Me I should lose nothing, but should raise it up at the last day. And this is the will of Him who sent Me, that everyone who sees the Son and believes in Him may have everlasting life; and I will raise him up at the last day.” The Jews then complained about Him, because He said, “I am the bread which came down from heaven.”"
Could you be a more stubborn group? These people, amazed by Jesus with all His miracles, follow Him around like sheep. They don't even bother bringing their own food, so He sits them down and feeds them miraculously, and they ask Him for another sign... more food. "Lord, we've just seen you feed thousands of people with a few baskets of fish and bread, do more miracles to feed us!" Well, Jesus already did all that. Yet, when He delivers His actual message, a message of eternal life, suddenly they don't want to know. They're so concerned with the things of this life that even when He gives them the things of this life, they get offended when He offers them eternal life. They want bread, they don't want to come to the one who gives them bread. It's really quite spectacular.
And it's a spectacle we repeat. We're more focused on the things of this life than the next. We look at this world, we see it is broken in the way God says it is broken, we see God answering prayers as He says He will answer them, but because He will not allow us to assume full control and pursues His eternal agenda rather than being overly concerned with the matters of this life, somehow He's just not there?
The world we see is exactly consistent with the state of affairs described in the Bible. We see the stain of sin corrupting every aspect of human life, from the world we inhabit to the very habits of our hearts. We see God answering prayers, so much so that atheists criticising prayer have to brush it off as a gigantic landslide of coincidences. Yet, though the Bible promises there will be trials and tribulations in this life, these same atheists point to those same trials and tribulations, and deny the power of prayer? This is exactly the kind of fool who, having tasted the bread Christ Himself plucked from thin air, walked away when, reminding them of their own mortality, Jesus pointed them to eternal life. Pray though we may, the moths are here to stay. Make sure it's just your clothes they eat.