First off, it's useful to understand that Catholics (and that's Roman or Eastern Catholic, and, for that matter Eastern Orthodox) do not pray to the saints, so much as ask the faithful departed to pray for them to God.
The idea has it's roots in the "communion of saints", along the lines of Hebrew's 12:
Therefore, since we are surrounded by such a great cloud of witnesses, let us throw off everything that hinders and the sin that so easily entangles.
Following on from chapter 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 prayer of a righteous person is powerful and effective" (James 5:16), 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 OK, 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.