In his first epistle, John uses the verb hamartano a number of times. If we claim that we have not sinned, we are representing God to be a liar, because He says that we have sinned (1:10). John writes so that we will not sin (2:1), but if we do sin (2:1), we have an advocate to represent us before God.
Those who abide in Christ do not sin (3:6), while those who continue on in sin have not seen Him or known Him (3:6). This is because the person who commits sin this way is of the devil (3:8). The one who is born of God doesn’t sin in this way (3:9). The one who is born of God does not sin (5:18).
Those who see a brother sin the kind of sin that is not “unto death,” then it is appropriate to pray for that person. God will give life to those who have not sinned to the point of dying over it (5:16). But if the person has died, there is no sense in continuing to pray for him.