God doesn't want us to sin. What is sin? Transgression of the Law.
Romans 14:23 - anything that does not come from faith or trust is a sin.
Romans 13 gives a good summary of how the law applies to Christians.
8 Owe no man any thing, but to love one another; for he that loveth another hath fulfilled the law.
9 For this, Thou shalt not commit adultery, Thou shalt not kill, Thou shalt not steal, Thou shalt not bear false witness, Thou shalt not covet; and if there be any other commandment, it is briefly comprehended in this saying, namely, Thou shalt love thy neighbour as thyself.
10 Love worketh no ill to his neighbour: therefore love is the fulfilling of the law.
Thus in all of our actions, striving to treat others as we would like to be treated, and to harm no one - this is the summary of what the law teaches in terms of conduct towards one another. That's really all we need to know.
Romans 7 speaks of sin as a living entity within our bodies, though James speaks of a law of liberty which also lives within us.
So in all these senses, sin is "missing the mark" in terms of not being of faith, not being of love, and being contrary to the divine nature given to us when we were born again.
So the idea that sin is the transgression of the law is only part of the understanding of sin. This is important to know, since confessing sins is part of the Christian life, and an important discipline to worship God in Spirit and in Truth.