Exerpt from GotQuestions.org
When someone commits a crime, the person who was harmed by the crime is not the one who punishes the criminal. Only the state can legally mete out punishment. It is the law that judges a person guilty or innocent, not the victim. It is the law that was violated. Regardless of the worthiness or innocence of the victim, all crimes are ultimately committed against the established law. If you rob your neighbor’s house, you have obviously wronged your neighbor, but it is not he who holds you accountable. It is the higher law you have violated. The state bears the responsibility to convict and punish you; your neighbor, although affected by your crime, defers to the state.
In the same way, all moral law begins with God. Because we were created in the image of God, we have His moral law written within our hearts (Genesis 1:27). When Adam and Eve ate from the forbidden tree in the Garden of Eden, God said, “The man has now become like one of us, knowing good and evil” (Genesis 3:22). At that time, no written law had been given, as far as we know. Yet God had clearly communicated His will to Adam and Eve, and they knew that they had sinned and ran to hide from God (Genesis 3:10). Their shame after sinning was intuitive.