The main point of this passage is that turning to any sort of spiritualism, such as turning to the dead on behalf of the living, is forbidden. People of faith should turn “to the law and to the testimony,” which are the scriptures. If other sources do not agree, “it is because there is no light in them.”
They of Israel who had ceased to seek the true God were about to pass into the bondage their king had led them to. Trouble, darkness, and the dimness of anguish lay ahead.
(Ellis T. Rasmussen, A Latter-day Saint Commentary on the Old Testament [Salt Lake City: Deseret Book Co., 1993], 510.)