Passage
And this is the judgment, that the light is come into the world, and men loved the darkness rather than the light; for their works were evil. For every one that doeth evil hateth the light, and cometh not to the light, lest his works should be reproved. But he that doeth the truth cometh to the light, that his works may be made manifest, that they have been wrought in God.
Nearby Context
John 3:17 For God sent not the Son into the world to judge the world; but that the world should be saved through him.
John 3:18 He that believeth on him is not judged: he that believeth not hath been judged already, because he hath not believed on the name of the only begotten Son of God.
John 3:19 And this is the judgment, that the light is come into the world, and men loved the darkness rather than the light; for their works were evil.
John 3:20 For every one that doeth evil hateth the light, and cometh not to the light, lest his works should be reproved.
John 3:21 But he that doeth the truth cometh to the light, that his works may be made manifest, that they have been wrought in God.
John 3:22 After these things came Jesus and his disciples into the land of Judea; and there he tarried with them, and baptized.
John 3:23 And John also was baptizing in Enon near to Salim, because there was much water there: and they came, and were baptized.
Study Lenses
The verse centers on "world", "light", "darkness", "judgment", "come", "loved", "rather", and "than". It is saying that the contrast between light and darkness marks a real divide in how people respond to God's work.
The nearby context moves from verse 18's "He that believeth on him is not..." into verse 22's "After these things came Jesus and his...", so "world" and "light" belong inside that flow. In Jesus Explains God's Saving Love, the local focus is new birth, eternal life, belief and unbelief, and God's saving love.
A plain takeaway is to answer the verse's own emphasis on "world" and "light" with trust shaped by these words, not by a vague optimism outside the passage.