The image of a light shining into the darkness comes from the Worship of the Shalems; the temple veil parted, shining light into the darkness of the Hekal where the initiates stood as the high priest / Lord / Melchizedek came from the Holy of Holies to join them.
Isaiah shows us this image.
John uses the image of the light shining into the darkness to identify Jesus as the high priest, i.e., as Melchizedek and Yahweh who was to come.
Lehi exhorts his errant sons to come out of that darkness and into the light.
Moroni uses the light image to describe the coming forth of the BoM.