Why does the Bible say that you can’t talk to the dead, but when Jesus went up to a hill he spoke to Elijah and Moses?
The Bible does forbid one from seeking to “talk to the dead.” Deuteronomy 18:9-12 says, “When you 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….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” (NASB). To “call up the dead” is to try to “communicate with the dead.” One who is guilty of this sin normally employs a MEDIUM (spirit medium) or a SPIRITIST (séance leader) to attempt to contact a loved one or friend who has died. God calls this act a “detestable thing” and whoever does it “is detestable to the Lord.”
Now let’s read the account that you were referring to in Mark 9:2-4, “Six days later, Jesus took Peter, James, and John, and led them up on a high mountain apart by themselves before them. His clothes became shining, exceedingly white, like snow, such as no launderer on earth can whiten them. And Elijah appeared to them with Moses, and THEY WERE TALKING WITH JESUS.” This can hardly be compared to what we just read in Deuteronomy, for nothing is said about Jesus seeking to contact Elijah and Moses through a MEDIUM or SPIRITIST. We simply read that Elijah and Moses “appeared to them” and that they “talked with Jesus.” Another interesting point to be made is that Elijah had never died, for we read in 2nd Kings 2:11 that “Elijah went up by a whirlwind to heaven.” So, this is definitely NOT a case of trying to “contact the dead.” Instead, Elijah and Moses appeared miraculously to speak with Jesus!
We might very well ask, “What were they speaking about?” The answer is given to us in Luke 9:30-31, “And behold, two men talked with Him, who were Moses and Elijah, who appeared in glory and SPOKE OF HIS DECEASE WHICH HE WAS ABOUT TO ACCOMPLISH AT JERUSALEM.” Jesus was on His way to Jerusalem to die on the cross so he could accomplish redemption for lost and guilty sinners. How fitting then that Moses and Elijah, who together represent “the Law and the Prophets,” should speak of His impending death (the word “decease” speaks of His “death”) which the Old Testament had predicted He would do for man’s salvation. You may recall that after Jesus died there were two of His disciples who were depressed, thinking that His death had ended all their hopes of their Messiah ruling over Israel. Jesus drew near to them to reveal to them that the Old Testament had indeed foretold His death. In Luke 23:25-27 we read, “Then He said to them, ‘O foolish ones, and slow of heart to believe all that the prophets have spoken! Ought not the Christ to have suffered these things and to enter into His glory?’ And beginning at MOSES AND ALL THE PROPHETS, He expounded to them in all the Scriptures the things concerning Himself.” It is very possible that one of the main reasons that Moses and Elijah appeared on the mount and talked to Jesus about His upcoming death, was to bear witness before Peter, James and John that “Moses and the prophets” had given ample testimony to this fact. Yet as we read on in Luke 9:32 we see that “Peter and those with him were heavy with sleep.” Moses and Elijah made a miraculous appearance to “awaken them” to the truth of Jesus dying for their sins to procure their salvation, but they “couldn’t stay awake” long enough to receive their revelation. (291.5) (DO)