First, it's necessary to understand that Catholics (whether Roman or Eastern Catholic, or Eastern Orthodox) do not pray to the saints; rather, they ask the faithful departed to pray for them to God.(1)
The idea has its basis in the "communion of saints," which may be derived from Heb. 12:1 (as well as other scriptures):
Therefore, since we are surrounded by so great a cloud of witnesses, let us rid ourselves of every burden and sin that clings to us and persevere in running the race that lies before us (NABRE)
Continuing from Heb. 11, the "cloud of witnesses" referred to is the faithful who have already died in Christ (those of the Old Covenant looking forward to Christ and the cross, those of the New Covenant looking back).
Since those who have died in Christ are now alive in him, the Catholic understanding is that we can converse with them just as with any believer still alive in this realm. Since they are alive we can asked them to pray for us just as we would approach a fellow believer who is living in this realm to pray for us: "Bob, I am really struggling with X right now. Would you please pray for me to find victory in this area?"
Coupled with the idea that "The fervent prayer of a righteous person is very powerful" (Jam. 5:16, NABRE), it then seems to make sense to ask those who have been recognized by church authority as being righteous and exemplary to pray for you.
The logic is, then, that if (a) you accept that asking another believer to pray for you is okay, and (b) you believe that those who have died with Christ are alive with him, then it follows that you can ask those who have died in Christ to pray for you.
(1) It's not uncommon for individuals to actually, and wrongly, pray to the saint; but if you pay attention to the liturgy the words are of the form "St. Peter, pray for us; St. Paul, pray for us..."