May they with pious affection remember my parents in this transitory life… So be fulfilled what my mother desired of me — more richly in the prayers of so many gained for her through these confessions of mine than by my prayers alone.
(Saint) Augustine, Confessions
Recently there has been an attack on the notion of relaying “thoughts and prayers” for victims of a tragedy. Mostly this is a political attack and not a theological one, as people claim that praying for someone is the same as not doing anything. Luckily, that’s not the subject of this post.
Theologically, for Christians, the notion can be a troublesome one. There are a lot of variations, but most Christians believe that they go to heaven based on some combination of grace, faith and works. (This is called justification.) Based on the freely given gift of grace from God, you can have faith in Jesus Christ and (perhaps) do good things to get into heaven.
Then why do people pray for the dead? Clearly, the dead's chance for good works and having faith is over. Can praying induce God to grant grace post facto to the dearly departed based on your entreaties? (We could get into the whole question of whether you can change God's mind with prayer here, but we will let that go for now.)
There is a long history of Christian theologians discussing this issue, resulting in the doctrine of purgatory, where souls are sent to “burn off” their remaining sins before they get to go into heaven. There is little-to-no discussion in the Bible on this topic; as with anything, you can read certain passages as eluding to the concept, but in my opinion these arguments are usually tortured (pun intended).
Luther and Calvin, responding mostly to the abuses of the Catholic Church selling get-out-of-jail-free cards to grieving families, deny the concept of purgatory, but kind of wishy-washily let people go ahead and pray for their departed loved ones if they wanted to and didn't overdo it.
Some claim that the whole issue was kicked off when Saint Augustine requested that people pray for his dead mother (Monica). If no less a personage than St. Augustine is saying it, then we have to take it seriously (so goes the argument); and, if he is asking for prayers for his dead mother then there has to be a point to it. What effect do prayers have on Monica's soul?
Probably, though, praying for the dead goes so far back into antiquity (including Jewish traditions) that early Christians probably just took it for granted. However, it's hard to explain if you believe that justification (heaven) comes from grace, faith or works (or some combination thereof).
Consider, though, that prayers for the departed (as in, for example, the commemoration of All Saints Day) is simply a way of remembering those that have gone before us, and a way of keeping their lives significant in ours.
People who have died are not truly gone until no one remembers them anymore, so perhaps our best shot at immortality is people's “thoughts and prayers.”