Isaiah describes people urging consultation of mediums and necromancers and counters it with, “To the teaching and to the testimony!” (Isaiah 8:19-20). The passage depicts those who reject this as passing through distress and darkness, with gloom and anguish (Isaiah 8:21-22).
Isaiah 8:19–22 warns Judah against turning to spirit-mediums and occult guidance when crisis hits. Instead, the people are urged to seek direction from God’s own “instruction and testimony,” the publicly given word that sets the standard for guidance. Those who refuse that standard will not find “morning” (a new day of help). These verses land in a section where Isaiah contrasts two kinds of “words”: human schemes and secret guidance versus the message God has already given through the prophet.
Isaiah 8:19–22 presents a crisis of guidance: people are pressured to seek hidden knowledge from mediums and “wizards” who whisper and mutter. The prophet treats that move as backwards—seeking help for the living by appealing to the dead—and contrasts it with seeking Israel’s God (explicit in verse 19).
A careful answer keeps the immediate passage, the book's argument, and the whole-Bible storyline together, so the question is answered in context instead of as a detached idea.
Start with Isaiah 8:19-20, then read the surrounding section so the answer stays connected to the passage's flow.
19When they shall tell you, "Consult with those who have familiar spirits and with the wizards, who chirp and who mutter:" shouldn`t a people consult with their God? on behalf of the living [should they consult] with the dead?
20To the law and to the testimony! if they don`t speak according to this word, surely there is no morning for them.