The 1969 protest song "War" asks "What is it good for?" and answers "Absolutely nothing!" If I substituted "Prayer" for "War," I would qualify my answer with "Almost nothing."
Prayer can be good for its placebo effect when believers feel they are doing something constructive, which might "cure" a psychosomatic disorder. On the other hand, replacing accepted medical practices with prayer has led to countless preventable deaths and injuries.
Many well-meaning people rely on prayer because it makes them feel upbeat when they don't know what action to take in a situation that is out of their control. Regardless of logic and statistical evidence to the contrary, fervent believers remain convinced that there is a god who listens to prayers. I've heard comments like "Sometimes our prayers are answered and sometimes they are not" and "God answers all prayers, but sometimes the answer is no."
Prayer can also be good for providing a sense of community to those who hope to achieve a desired outcome. But such prayers might not always be for outcomes beneficial to all, as depicted in Mark Twain's "The War Prayer," a prayer for the suffering and destruction of enemies, as typified by "O Lord our God, help us to tear their soldiers to bloody shred." This "prayer" was left unpublished until years after Twain's death because his family considered it too sacrilegious.
I've recently listened to prayers by two popes. The first was in the film "Amen," which is based on the life of Kurt Gerstein, an actual chemical engineer in the German SS who developed Zyklon B to purify drinking water for troops. Gerstein becomes horrified when he discovers that that Zyklon B is being used instead to kill Jews in Nazi extermination camps. Gerstein and a fictional Jesuit priest try to persuade Pope Pius XII (who actually presided during World War II) to take a strong and public stand against Hitler's slaughter of Jews. The Pope assures the priest he will do so in his upcoming 1942 Christmas address. The priest and Gerstein listen to the radio address as the Pope calls for faithful Christians everywhere to unite in prayer for all people who are hurting. Among the platitudes there is no mention of Nazis, Jews or extermination camps.
The day after I saw this film, I heard Pope Francis ask the faithful to pray about the current Mideast atrocities. (Coincidentally, Pope Francis is now deciding whether to declare Pius XII a saint.) I don't fault the non-action of Francis like I do that of Pius XII, who had some influence over the Nazi regime. Hitler was baptized as a Catholic and remained in good standing with the Church.
Pope Pius appeared to use prayer as an excuse to avoid action. Francis, on the other hand, has essentially no influence on Hamas or the Israeli government, much less with the terrorist group ISIS, whose religious fervor is reminiscent of Mark Twain's "War Prayer." I don't know what would work to bring peace to the Mideast, but I do know what won't work -- prayer.
For centuries, theologians have struggled with the theodicy problem of why an all-powerful and all-good God would permit evil. Prayer, to me, is like theodicy on steroids. If I were a believer, it would seem like heresy to ask God for something he hadn't planned on giving (like a missed field goal by an opponent). Doesn't God already know what is best, and what could I possibly say to make him change his mind? And why would God answer a prayer to cure one sick person, but ignore the prayers of millions who died in the Holocaust -- or those innocent civilians in Gaza, Israel and Iraq?
I'm reminded of the story about a Jerusalem journalist, who saw the same old Jewish man praying vigorously every day for weeks at the Western Wall. Sensing a story, the journalist said to the old man: "You pray at the wall every day. What are you praying for?"
The man said, "In the morning, I pray for world peace; in the afternoon, I pray for the brotherhood of man; in the evening, I pray for the eradication of illness and disease from the earth."
"And how long have you been doing this?" asked the journalist."Every day, for 27 years," answered the old man.
Amazed, the journalist asked how it felt to pray every day for those things. The old man shrugged and replied, "How does it feel? It feels like I'm talking to a wall!"
I prefer the advice of Robert Ingersoll, known as the great agnostic: "The hands that help are better far than the lips that pray."