God is in the light. He is holy and without sin. Sin brings darkness. To get closer to God we must ask His forgiveness for our sin and because of Jesus’ death on the cross the offense of our wrongful sin is removed from our life.
1 John 1:
6 So we are lying if we say we have fellowship with God but go on living in spiritual darkness; we are not practicing the truth. 7 But if we are living in the light, as God is in the light, then we have fellowship with each other, and the blood of Jesus, his Son, cleanses us from all sin.
8 If we claim we have no sin, we are only fooling ourselves and not living in the truth. 9 But if we confess our sins to him, he is faithful and just to forgive us our sins and to cleanse us from all wickedness. 10 If we claim we have not sinned, we are calling God a liar and showing that his word has no place in our hearts.