5 Now Moses, in the law, commanded us that such should be stoned. But what do You say?” 6 This they said, testing Him, that they might have something of which to accuse Him. But Jesus stooped down and wrote on the ground with His finger, as though He did not hear. 7 So when they continued asking Him, He raised Himself up and said to them, “He who is without sin among you, let him throw a stone at her first.” 8 And again He stooped down and wrote on the ground. 9 Then those who heard it, being convicted by their conscience, went out one by one, beginning with the oldest even to the last. And Jesus was left alone, and the woman standing in the midst. 10 When Jesus had raised Himself up and saw no one but the woman, He said to her, “Woman, where are those accusers of yours? Has no one condemned you?” 11 She said, “No one, Lord.” And Jesus said to her, “Neither do I condemn you; go and sin no more.” 12 Then Jesus spoke to them again, saying, “I am the light of the world. He who follows Me shall not walk in darkness, but have the light of life.”
Among the 7 “I am” statements in the book of John, I am the Light of the World is the second. John’s use of light of the world in John 8, is consistent with the overall theme of the Bible – Light and Darkness. When Jesus says, ‘I am’, it is a complete thought and a divine sentence.
Note that Jesus performed miracles not merely to show the amazing miracle itself, but that we will believe the work He does. An example is in Mark chapters 4 and 5. In Mark 4, he calmed the wind and waves, but right after he encountered a man who is possessed with demons. Jesus delivered him. The calming of the winds and waves (Mark 4) introduced the deliverance ministry of Jesus (Mark 5).
Similarly, John 8 didn’t begin with the ‘I am’ declaration. It began with a woman who was caught in adultery and brought to him for judgement. Jesus’ response was to write in the sand. Interestingly, there are 3 times in the Bible when God wrote. God wrote the Laws on the tablets of stone (Exodus), wrote judgement on the plastered wall (Daniel), and wrote about sin in the sand (John). If he intended for our sin to be permanent, He would not write it in the sand.
This account in John 8 shows how Jesus pardoned the woman, saved her soul from death, and hid a multitude of sin. Then, He introduced himself as I am the light of the world (bad people). Jesus is the Light that attracts bad people. Following Jesus means walking in the light, not darkness. Darkness is the absence of light.