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.