Don Carson on sin:
What is sin?
Sin is not some socially disapproved activity or refusing to engage in what is socially sanctioned. From the Bible’s point of view sin is simply doing what God prohibits or not doing what God commands. The ultimate odium in sin is bound up with the fact that it is always rebellion against God. That is what gives sin transcendentally ugly value.
That’s why in Psalm 51 David says:
Against you, you only, have I sinned and done what is evil in your sight.