Passage
This is the judgment, that the light has come into the world, and men loved the darkness rather than the light; for their works were evil. For everyone who does evil hates the light, and doesn’t come to the light, lest his works would be exposed. But he who does the truth comes to the light, that his works may be revealed, that they have been done in God.”
Nearby Context
John 3:17 For God didn’t send his Son into the world to judge the world, but that the world should be saved through him.
John 3:18 He who believes in him is not judged. He who doesn’t believe has been judged already, because he has not believed in the name of the one and only Son of God.
John 3:19 This is the judgment, that the light has come into the world, and men loved the darkness rather than the light; for their works were evil.
John 3:20 For everyone who does evil hates the light, and doesn’t come to the light, lest his works would be exposed.
John 3:21 But he who does the truth comes to the light, that his works may be revealed, that they have been done in God.”
John 3:22 After these things, Jesus came with his disciples into the land of Judea. He stayed there with them, and baptized.
John 3:23 John also was baptizing in Enon near Salim, because there was much water there. 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 who believes in him is not..." into verse 22's "After these things Jesus came with 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.