A religious friend summed up prayer in the following way: it is a way of finding inner peace about something when you lack it. In other words, you cannot change anyone's situation through prayer; you can only change how you feel about their situation.
I think it's an interesting way to look at it, but it's never stopped me from hoping for a miracle.