After John 3:16-18 about belief in Jesus and judgment, the next three verses contrasts divine light with evil darkness. The judgment of John 3:16-18 is explained in the Gospel of John 3:19-21.
John 3:20 (NASB) says, “For everyone who does evil hates the Light, and does not come to the Light for fear that his deeds will be exposed.”
Sin, hated, and fear keep the lost from Jesus.