A commandment is essentially a dividing line between what is considered good, and what is considered evil. Commandments are typically associated with deity. However, a commandment is a law. A law in any society, whether it be godly or not, defines what is good or evil within that society. The simple illustration below makes the concept very easy to understand.
Law is the establishment of a boundary. Take for example, the law prohibiting stealing. If you take something from someone that does not belong to you, then you have 'crossed the line'. Those who do not steal are within the boundary established and are considered good within this context. Those who do steal have left the established boundary and are considered evil in this context.