Sin is defined by John as lawlessness or transgression of the law. In other words, a person who practices sin refuses to recognise the authority of God. Sin is rebellion against the standards of God. This rebellion can show itself in different ways.
Christians are still affected by sin but want help in dealing with it. John connects the remedy for this problem to the person and work of Jesus. He reminds his readers why Jesus came and what kind of person he is. It can be assumed that followers of Jesus will want to be in line with his mission and will want to become increasingly like him.
Why did Jesus come into the world? He appeared, says John to take away sins. Obviously this is a description of the mission that he accomplished in his life on earth and by his death on the cross.
John also reminds his readers that there is no sin in Jesus (v. 5). He is not merely affirming the sinlessness of Jesus; he is also reminding us of the goal of salvation and the ambition of true believers, which is to be like Jesus. And they do this in the present by abiding in Jesus.
So we have to realise that all sin is lawlessness, rebellion against God. Our sin is a roadblock for us on the path to heaven that we have to overcome. God has provided encouragements for us as we face our sins – the past work on the cross by Jesus and the prospect of being like him. The Spirit also enables us to abide in Christ even although we are still sinful. As we do, we can confess our sins knowing that there is ongoing cleansing for us by the blood of Jesus.