Communicating with the dead?
The Bible has a story about a case where communication with the dead actually happened. King Saul did it. The spiritist at En-Dor put him in touch with the prophet/judge Samuel, who had made Saul king many years earlier. This spiritist was apparently renown as an extra-large among the area's mediums. This was no fake Samuel she reached, either (despite what you may read in the fundamentalist press); the text treats him as the real Sam - who sent the medium into a panic. But this Sam was not at all happy about being contacted. He truthfully issued God's final doom on Saul and his sons, specifically because Saul was so willing to do dirty to God. The next day, Saul found out first-hand about being in the realm of the dead.
(You can, of course, choose to take this incident figuratively. But there are no grounds for doing so here which you don't also have for most of the rest of Israelite history. You could also do something as radical as imposing modern-day theological conclusions about death upon the ancient biblical text, and say, 'this is how it really went'. But that's a refusal to let the Bible speak for itself, a refusal on your part to really listen. There is one matter that is key to the discussion here: The one option the text itself does not at all allow is that the apparition is a demon out to undo God's plans, for in fact, what's spoken is a great prophecy stating what God's plans are for a crucial moment in Hebrew history.)
Knowing Death and Other 'Secrets'
Let's put aside for the moment the Devil's ability to manipulate what comes from beyond the grave -- a big problem, but not the crucial one. Let's also put aside the vast array of phonies who con people out of mucho money -- they are not the issue. The issue is why one would want to go to a medium or to channel in the first place. The notion of actually knowing the dead leads directly to thinking that this knowledge can help make for a good death or even for bypassing the ugliness of death. This is the Gnostic way, the way of the inside track and the spiritual secret. But knowledge can't do the trick. No one has ever been made perfect or sinless or deathless or complete or even merely good by mere knowledge. Knowledge cannot change a person's nature. However, it can help us to create a mirage of where this life will lead. Ultimately, if we have the knowledge, we will rely on it, and it will fail us. All else will fail us, except God. The 'secret' to death is that we are to live life as God would have us live it, through the Holy Spirit, and then trust that this same God who loves us in life will also love us in death, and, by mysteries beyond what any seer can tell, through the work of Christ, bring us through death to a new life with God. But that's no secret. That's the Good News, the gospel. And you've already been told about it.
Then, there are people who are so pained over losing a loved one that they seek any way possible to get in touch with them (like Bishop Pike did over his son). It sounds like a good thing, at least on the surface of it. But this is still a way of avoiding truth. The answers to 'why' something happened are found among the living, not the dead. And only God can rob death of its finality. We have to deal with the death of those we love by living a life which honors them, a life that shows where their love matters. If you're desperate enough to try to contact the dead, then you aren't trusting God, but instead are trusting someone who has done nothing in our lives to earn any trust.
I just spoke under the presumption of an honest (though misguided) search for truth. But not everyone is so honest. Many of those seeking to reach the dead do so with the wicked dishonesty of King Saul. Saul was seeking a way out of the mess he himself had created by being disloyal to God and foolish toward his own soldiers. He was hoping Samuel could in some way intercede for him before God, or perhaps could clear up the problem himself. But Samuel told Saul that his problem was with God, not Samuel, and that he had just made it worse by using a form of divination (occultic means to discover the unknown), forbidden by the Law and punishable by death. Samuel made it clear that necromancy is not how one follows God; it was instead the last straw in Saul's series of betrayals of the Covenant. Saul had turned to other spiritual powers instead of God.
Many people today look toward mediums and spiritists for help in getting out of the binds they put themselves in. They even have developed "angel therapy" in which they aid healing by getting people in touch with 'angels'. Then as now, special knowledge 'from beyond' does not help. What helps is to do the right thing in the first place. And the mess is made much worse by trying to evade what one has to do. That kind of living is quite far from living in the Spirit.