Fra Angelico, “The Forerunners of Christ with Saints and Martyrs” (c. 1423-24) (Public Domain)
“We believe in the communion of all the faithful of Christ, those who are pilgrims on earth, the dead who are being purified, and the blessed in heaven, all together forming one Church; and we believe that in this communion, the merciful love of God and his saints is always [attentive] to our prayers.” —Pope Paul VI
It's understood in Catholic spirituality and theology that any of us can pray to God at any time. The Bible emphasizes relationship to God, as sons and daughters to a Father. That said, there is also the practice of praying for each other. Our Protestant brethren in Christ (who generally reject intercession of the saints) accept the notion of “getting a holy man [or the pastor, etc.] to pray for you.”
Hence, a person would, for example, ask Billy Graham to pray for them, because it is thought that somehow his prayer might have more effect. This intuition is actually based on explicit biblical testimony:
James 5:14-18 (RSV)  Is any among you sick? Let him call for the elders of the church, and let them pray over him, anointing him with oil in the name of the Lord;  and the prayer of faith will save the sick man, and the Lord will raise him up; and if he has committed sins, he will be forgiven.  Therefore confess your sins to one another, and pray for one another, that you may be healed. The prayer of a righteous man has great power in its effects.  Eli'jah was a man of like nature with ourselves and he prayed fervently that it might not rain, and for three years and six months it did not rain on the earth.  Then he prayed again and the heaven gave rain, and the earth brought forth its fruit.
Note here that the Bible itself recommends asking someone else to pray: “the elders” of the Church, who, like other Church leaders (1 Tim 3:1-13; Titus 1:7), are supposed to be of exemplary character, and “worthy of double honor” (1 Tim 5:17). They have more power, due to their ordination.
To nail down his point, St. James cites the example of the prophet Elijah. When he prayed, it didn't rain for three-and-a-half years. James says this was the case because (here is the principle he wishes to convey): “The prayer of a righteous man has great power in its effects.” We see the same dynamic in the following passage:
1 Kings 13:6 And the king said to the man of God, “Entreat now the favor of the LORD your God, and pray for me, that my hand may be restored to me.” And the man of God entreated the LORD; and the king's hand was restored to him, and became as it was before.
This is the biblical rationale for asking others, of more spiritual stature in the kingdom, or holier (or, best of all, both!) to pray for us. But that is not yet the same as asking a (dead) saint to pray for us. How does one arrive at that conclusion? It takes a little more work, but it is possible to ground it, too, in Scripture.
In Revelation 5:8, the “twenty-four elders” (usually regarded by commentators as dead human beings) “fell down before the Lamb . . . with golden bowls full of incense, which are the prayers of the saints.” They appear to have other people's prayers, to present to God. So the obvious question is: what are they doing with them? Why does Revelation present dead saints presenting the prayers of other saints to God?
If they have them, it stands to reason as a rather straightforward deduction, that they heard the initial prayers as well, or at least were granted knowledge of them in some fashion: ultimately through the power of God. Revelation 8:3-4 is even more explicit. Rather than equating incense and prayers, it actually distinguishes between them, and presents the scenario that the prayers and incense are presented together:
And another angel came and stood at the altar with a golden censer; and he was given much incense to mingle with the prayers of all the saints upon the golden altar before the throne;  and the smoke of the incense rose with the prayers of the saints from the hand of the angel before God.
It seems clear that they have heard the prayers of men, and are involved as intercessors. Angels are extremely intelligent beings. We know that they rejoice when a sinner repents. They have knowledge in ways that we do not; above our comprehension.
This is biblical proof that dead saints and angels both somehow know about our prayers and present them to God. They are acting as intercessors and intermediaries. How do they hear our prayers? God gives them the power to do so because they are in heaven and therefore, outside of time. They are aware of earthly events. We know that from Hebrews 12:1 (“we are surrounded by so great a cloud of witnesses”) and from Revelation 6:9-10, where dead saints are praying for those on the earth.
We also know of several incidents where dead men (even some from heaven) interact with those on earth: the Transfiguration (Mt 17:1-3 / Mk 9:4 / Lk 9:30-31), the Two Witnesses of Revelation 11:3-13, the prophet Samuel (not just a demon impersonating him: 1 Sam 28:7-20), and “many bodies of the saints” that came out of their graves after Jesus' Resurrection and went into Jerusalem, appearing to many (Mt 27:50-53). In the deuterocanonical book of 2 Maccabees (15:13-16) the prophet Jeremiah returns to earth.
This is our entire rationale for asking saints to pray to God for us: all in perfect harmony with the Bible:
1) Holy men and women's prayers have great power.
2) Dead saints are perfected in holiness and are still part of the Body of Christ.
3) The Blessed Virgin Mary in particular is exceptionally holy (Immaculate Conception) and as the Mother of God, her prayers have more power and effect than that of any other creature: all by God's grace.
4) We know that they are aware (or are made aware) of earthly events.
5) We know that they exercise much charity and pray for us.