1 John 1 5 This then is the message which we have heard of him, and declare unto you, that God is light, and in him is no darkness at all. 6 If we say that we have fellowship with him, and walk in darkness, we lie, and do not the truth: 7 But if we walk in the light, as he is in the light, we have fellowship one with another, and the blood of Jesus Christ his Son cleanseth us from all sin. 8 If we say that we have no sin, we deceive ourselves, and the truth is not in us. 9 If we confess our sins, he is faithful and just to forgive us our sins, and to cleanse us from all unrighteousness. 10 If we say that we have not sinned, we make him a liar, and his word is not in us.
What does it mean to walk in the light or to walk in darkness? Well, it says right here that God is light, and in other scripture, Jesus also refers to Himself as the Light.
I would suggest that to walk in the light would be to walk in the truth of Jesus, having faith in the gospel, having faith that He has died for your sins, and that you are forgiven. That Jesus has made you righteous before God by His once, fully sufficient sacrifice.
And that to walk in darkness, would be to walk not according to this faith in Christ. There is only one way to have fellowship with God and walk in the light, and that is to have been made righteous by believing on Jesus. Jesus has made us righteous before God.
Some might like to suggest that walking in the light is to stop sinning and be good enough, but I can assure them, they're not good enough to have fellowship with God.
If somebody says they have fellowship with God but they don't have faith in the finished work of Christ, that He died for their sins and they are forgiven, and made righteous before God by the blood of Jesus alone, they lie. The gospel is the truth. If they won't believe it, they are walking in darkness.
Some people take 1 John 1:9 "If we confess our sins, he is faithful and just to forgive us our sins, and to cleanse us from all unrighteousness." and use it to justify their belief that they must confess each sin to be forgiven. But that would deny the gospel, and would also contradict verse 7, which testifies to the truth, that "the blood of Jesus Christ his Son cleanseth us from all sin." Not just some sin, or one sin, all sin. And even that verse itself, says "to cleanse us from all unrighteousness." Not just some unrighteousness, all of it.
The greek word that is translated "confess" can also be translated as acknowledge. I think it's more appropriate to understand this passage as saying, if we'll acknowledge that we're sinners, that we have sin in us, Jesus is faithful to forgive us, and make us fully righteous. This is salvation, a one time event. There were some at the time this was written, and there are some today also, that don't believe sin is real. It's this acknowledgement that is being sought. To understand we are sinners, in need of a savior. If somebody says they haven't sinned, they make Jesus out to be a liar, having made the ultimate sacrifice to pay for sins that they say never existed.
I think some have the idea that the only difference between the old testament and the new, is that now instead of the blood of animals being offered up for sin, the blood of Jesus is bottled up somewhere, and is offered each time they sin, repeatedly. This is not true. In the old testament, priests made continual sacrifices for sins, and even then, they couldn't save a person. Those saved, were saved by faith. Jesus made one sacrifice for all sin, and it was accepted. There is no more sacrifice for sins. Jesus made it already, once. If you won't accept His one sacrifice for sins as fully sufficient, there's nothing else for you. That's it. If you think there's some other sacrifice you have to make, through continual prayers or being sorrowful enough, or whatever, you're implying the blood of Jesus is not fully sufficient to forgive you and make you holy and righteous before God.
For someone to be sorrowful about their sin, and to pray to God about it is fine, of course. But to suggest that is playing some part in salvation, is false. I know some take this passage to mean, when we sin, we can go to God, and be sure we have forgiveness. That is true, of course, because we're already forgiven. And for some, this is really helpful to them. No problem. But I really think, in context, that it's a confession of sin in a general sense that's being talked about. 1 John 1:10 "If we say that we have not sinned, we make him a liar, and his word is not in us."
If you've believed on Jesus alone for your salvation, that He died for your sins, was buried, and rose again on the third day, you're forgiven already. If you think there's something else you have to do to be saved and forgiven, there's nothing else for you. If you think you have to be good enough, I assure you, you're not good enough.