The Communion of Saint
Catholics believe that they are part of the Communion of Saints. This is a three-way participation in the body of Christ composed of those on earth, those in Purgatory and those in Heaven. These three groups are all a part of the Church of Christ, but each in a different capacity corresponding to their place of residence. As already in Heaven, the saints don't need prayers offered on their behalf, but they can and do offer prayers as intercessors for those in Purgatory and on earth. Those in Purgatory receive the effects of the prayers of those on earth and in Heaven for their quick release. Those on earth can pray for others on earth or in Purgatory as well as receive the effects of the prayers of the other members of the Communion of Saints.
In the Bible
In the Bible, there is mention of the unity of all those who believe in Christ. “So then you are no longer strangers and sojourners, but you are fellow citizens with the saints and members of the household of God.” - Ephesians 2:19. St. Paul tells his listeners that they are members of the Church along with the saints in Heaven. There are also several places in which praying for other members of the church is advised and encouraged. “So Peter was kept in prison; but earnest prayer for him was made to God by the church.” - Acts 12:5. Here we have an example of people on earth praying for others on earth. “Another angel with a golden censer came and stood at the altar; he was given a great quantity of incense to offer with the prayers of all the saints on the golden altar that is before the throne. And the smoke of the incense, with the prayers of the saints, rose before God from the hand of the angel." - Revelation 8: 3 – 4. John sees in his vision the prayers of the saints, and their prayers could only be offered for those on earth or in Purgatory, since they in Heaven want for nothing.
Early Church Fathers – Praying in the Communion of Saints
The early church recognized the importance and efficacy of prayers offered on our behalf by others in the Communion of saints. Many of them spoke of the practice of asking the saints for prayer as well as the prudence and wisdom in doing so.
But not the high priest [Christ] alone prays for those who pray sincerely, but also the angels... as also the souls of the saints who have already fallen asleep. - Origen On Prayer II
Then [during the Eucharistic prayer] we make mention also of those who have already fallen asleep: first, the patriarchs, prophets, apostles, and martyrs, that through their prayers and supplications God would receive our petition. - Cyril of Jerusalem Catechetical Lectures 23:9
Do you, [Ephraem] that art standing at the divine altar...bear us all in remembrance, petitioning for us the remission of sins, and the fruition of an everlasting kingdom. - Gregory of Nyssa Sermon on Ephraem the Syrian
May Peter, who wept so efficaciously for himself, weep for us and turn towards us Christ's benign countenance – Ambrose Hexameron 5:25:90
A Christian people celebrate together in religious solemnity the memorials of the martyrs, both to encourage their being imitated and so that it can share in their merits and be aided by their prayers. - Augustine Against Faustus the Manichean
You say in your book that while we live we are able to pray for each other, but afterwards when we have died, the prayer of no person for another can be heard...But if the apostles and martyrs while still in the body can pray for others, at a time when they ought still be solicitous about themselves, how much more will they do so after their crowns, victories, and triumphs? - Jerome Against Vigilantius 6
These early Christian writers clearly speak of the necessity and advantageousness of praying to the saints in Heaven. Jerome even specifically addresses the erroneous belief that after death, the saints cannot offer prayers of intercession to God anymore. This belief in the communion of saints and the corresponding ability for intercessory prayer among all three groups in the communion of saints has been taught since the earliest days of the Church.