In John 3:19-21, Jesus taught the following: “This, then, is the judgment: The light has come into the world, and people loved darkness rather than the light because their deeds were evil. For everyone who practices wicked things hates the light and avoids it, so that his deeds may not be exposed. But anyone who lives by the truth comes to the light, so that his works may be shown to be accomplished by God.”
Take note of the interesting contrast of behaviors. The contrast Jesus sets up isn’t between "everyone who practices wicked things" over against everyone who practices righteous things. It’s over against “anyone who livesby the truth”.
I take that to mean one who is truthful, is transparent, or is honest. This person "comes to the light" that is, he is honest about where he's at not because he sees himself as doing better than others, but because he has no qualms about revealing how unlike Jesus he is. It is precisely that transparency which makes it obvious that "his works (are) shown to be accomplished by God." Those who truly know that person know that there is simply no other way to explain that individuals self-giving lifestyle but that God is doing it.