It is an unlawful action, a violation of the law and of the will of God expressed in the law, and it draws upon itself God's wrath and punishment.
The expression "commits sin" is opposed to the expression "to have no sin" (1 Jn 1:8 and note).
"The Apostle speaks as though saying: you who have been adopted, do righteousness and do not show yourselves idle in it.
For with respect to sin, the sinner or lawless man is not the one who has committed or will commit a sin.
Rather, he is the one who clings to evil and does evil.
So also the righteous man is not the one who remains inactive, but the one who does righteousness.
It must also be known that sin is called a falling away from the good, while lawlessness is the violation of a positive law.
Both have one beginning: the one is a falling away from the good, and the other is transgression of a positive law.
Yet in essence both converge.
The sinner has deviated from the goal appointed according to nature and in nature. For the goal of human nature is to live according to reason, having driven irrationality far away.
Likewise the lawless man, rushing unrestrainedly toward evil, transgresses the law implanted in nature" (Theophylact).
Apparently the Apostle directs his word against the false teaching of heretics who deceived the believers (1 Jn 2:26).
They spread perverse rules that weakened the moral law and Christian duties among believers.
They apparently taught that faith without good works was sufficient for appropriating redemption, as in Jas 2:14 and following; compare the note.
The Apostle therefore impresses upon believers: you must purify yourselves from sin and fear sin, because sin is a transgression of the law of God and of Christ.
Whoever does not fulfill the law and does not do what the teaching of Christ commands is a transgressor of the law.
So is whoever does what it forbids.
Such a man is subject to condemnation as a sinner and cannot be counted worthy of seeing Him, which is promised to the children of God born of Him.
The one who commits sin is a transgressor of God's law and will.
This means not only the one who consciously and stubbornly commits sin, but also the one who does not withdraw from sin.
Sin is imputed to him as lawlessness.
This is all the more true of sin that enslaves the will, thoughts, and feelings of a man, as though depriving him of spiritual life.
Of such sin the Lord says that everyone who commits sin is a slave of sin (Jn 8:34).