All verses are quoted from the NASB anything in [square brackets] is added by me for clarity.

"When you [God's people] enter the land which the LORD your God gives you, you shall not learn to imitate the detestable things of those nations. There shall not be found among you anyone who makes his son or his daughter pass through the fire, one who uses divination, one who practices witchcraft, or one who interprets omens, or a sorcerer, or one who casts a spell, or a medium, or a spiritist, or one who calls up the dead. For whoever does these things is detestable to the LORD; and because of these detestable things the LORD your God will drive them out before you." Deuteronomy 18:9-12

Here we see that God says it is detestable to Him that anyone should pray to the dead. So the practice of praying to dead saints should be considered detestable by Christians. However while Jesus was speaking to the Sadducees He said -

"But regarding the resurrection of the dead, have you [Sadducees] not read what was spoken to you by God: 'I AM THE GOD OF ABRAHAM, AND THE GOD OF ISAAC, AND THE GOD OF JACOB'? He is not the God of the dead but of the living.' " Matthew 22:31-32

So one might argue that the Saints are not "dead" but "living", because God is the God of the living and not of the dead. So if this were the case then the commandment in Deuteronomy would only be against praying to people who are in hell but not against people who are in heaven. So is there any way to determine if this is the correct understanding of these verses? If we can find an example of someone who prays to a physically dead saint (someone who's on God's side) and yet it is still considered by God to be wrong then we can say that the above argument is invalid. There is only one passage in the bible that I know of where someone prays to a dead "saint" and that is in 1 Samuel 28 -

"Now Samuel was dead, and all Israel had mourned for him and buried him in his own town of Ramah. [King] Saul had expelled the mediums and spiritists from the land. The Philistines assembled and came and set up camp at Shunem, while Saul gathered all the Israelites and set up camp at Gilboa. When Saul saw the Philistine army, he was afraid; terror filled his heart. He inquired of the LORD, but the LORD did not answer him by dreams or Urim or prophets. Saul then said to his attendants, `Find me a woman who is a medium, so I may go and inquire of her.' `There is one in Endor,' they said. So Saul disguised himself, putting on other clothes, and at night he and two men went to the woman. `Consult a spirit for me,' he said, `and bring up for me the one I name.' But the woman said to him, `Surely you know what Saul has done. He has cut off the mediums and spiritists from the land. Why have you set a trap for my life to bring about my death?' Saul swore to her by the LORD, `As surely as the LORD lives, you will not be punished for this.' Then the woman asked, `Whom shall I bring up for you?' `Bring up [Saint] Samuel,' he said. When the woman saw Samuel, she cried out at the top of her voice and said to Saul, `Why have you deceived me? You are Saul!' The king said to her, `Don't be afraid. What do you see?' The woman said, `I see a spirit coming up out of the ground.' `What does he look like?' he asked. `An old man wearing a robe is coming up,' she said. Then Saul knew it was Samuel, and he bowed down and prostrated himself with his face to the ground. Samuel said to Saul, `Why have you disturbed me by bringing me up?' `I am in great distress,' Saul said [/prayed]. `The Philistines are fighting against me, and God has turned away from me. He no longer answers me, either by prophets or by dreams. So I have called on you to tell me what to do.' Samuel said, `Why do you consult me, now that the LORD has turned away from you and become your enemy? The LORD has done what he predicted through me. The LORD has torn the kingdom out of your hands and given it to one of your neighbors—to David. Because you did not obey the LORD or carry out his fierce wrath against the Amalekites, the LORD has done this to you today. The LORD will hand over both Israel and you to the Philistines, and tomorrow you and your sons will be with me. The LORD will also hand over the army of Israel to the Philistines.' Immediately Saul fell full length on the ground, filled with fear because of Samuel's words. His strength was gone, for he had eaten nothing all that day and night." 1 Samuel 28:3-20

Here we see Saul tries to pray to God but God does not answer Saul's prayers. So Saul then prays to the dead prophet Samuel. Since Samuel was a prophet of God, it stands to reason that He is among the "living" that Jesus said that the Father is the God of. Moreover Hebrews says -

"And what more shall I say? For time will fail me if I tell of Gideon, Barak, Samson, Jephthah, of David and Samuel and the prophets, who by faith conquered kingdoms, performed acts of righteousness, obtained promises, shut the mouths of lions," Hebrews 11:32-33

Here the author of the book of Hebrews lists Samuel among those who have a saving faith in God. Hence Samuel is definitely one of "the living" that Jesus spoke of. So to sum up so far we have seen that Saul has prayed to Samuel who is physically dead but one of the "living" by having saving faith in God. Now for the clincher, at the end of King Saul's life we read -

"So Saul died for his trespass which he committed against the LORD, because of the word of the LORD which he did not keep; and also because he asked counsel of a medium, making inquiry of it, and did not inquire of the LORD. Therefore He killed him and turned the kingdom to David the son of Jesse." 1 Chronicles 10:13-14

Notice that one of the reasons God killed king Saul was that he prayed to Samuel and not to God! Therefore we can definitely conclude that praying to any physically dead saints is detestable in the eyes of God!