So often when we sin (erroneous thinking) , the darkness becomes our refuge. We then wallow in self-pity, hatred, bitterness, self-righteousness, etc. By turning to the Christ, error is revealed to us to be corrected, not to punish us. The Christ (Truth, light) illuminates us by driving out the darkness.
“But if we walk in the light, as he is in the light, we have fellowship with one another, and the blood of Jesus, his Son, purifies us from all sin.” 1 John 1:17