Broadly defined, laws are codified rules regulating behavior that are put in place by legislators, and morality is series of behavioral imperatives shaped by religion, culture, and society. Violating laws usually results in punishment inflicted by the state, while violating a moral code results in social disapproval and rejection. The intersection of law and morality is quite broad, as most of the more egregious moral transgressions, such as murder and rape, are also illegal. However, morality covers a wide spectrum of human behavior and many actions that are considered immoral by some groups of people are not against the law.
The influence of moral codes is most apparent in criminal laws which apply to actions that may cause harm to others, or affect their property. The impact of morality is also evident in criminal legislation that regulates behavior that does not directly impact others, such as substance use, consensual sexual acts, and gambling. An ongoing question in secular societies is whether it is appropriate to base laws regulating personal behavior that is not harmful to others or to the public order on moral codes that only some of the population adhere to.
The First Amendment to the Constitution of the United States stipulates a separation of church and state; the government may not adopt an official religion or prohibit or suppress the practice of any particular religion. This supports an argument for the exclusion of morality from legislation. Justice Oliver W. Holmes, a renowned legal scholar, argued that law should be completely separated from morality, which he considered to be too subjective to be used as a basis for legislation (Scheller, p. 319). Despite arguments to the contrary, though, laws are clearly influenced by moral codes. In the United States, one can trace changes in public mores by looking at changes in laws. For example, laws prohibiting sodomy, prostitution, and the use of marijuana have been eliminated or modified in many states as attitudes about these behaviors have changed. Many behaviors that were considered ‘sinful’ and were historically criminalized, such as adultery, are no longer against the law. Some of these behaviors may still be prosecuted in civil courts, but are no longer subject to criminal penalties.
Observing the changes in laws in conjunction with changes in public mores supports the argument that morality does influence legislation. Moral codes have been used as a basis to legislate against private behavior, even when it does not negatively impact others or disrupt the social order. Even activities such as marriage, which is a publicly executed contract, but has no harmful effect, has been regulated by laws based on moral biases against interracial and homosexual relationships. It is problematic to enact laws that regulate non-harmful behavior based on moral codes practiced by some, but not all, of those that are affected by them. Many moral imperatives are based on religious principles, making it particularly difficult to use them to construct laws in a country that prohibits the state from enforcing religious tenets. Behavior is shaped by both laws and moral codes, but the methods of regulation differ. The state controls behavior through legislation which provides for punitive measures for transgressors, while morality is enforced largely through social pressure (Shavell, p. 228).
Many laws have been challenged in the courts based on the perception that they represent a moral principle rather than an objective legal standard. Famous appellate decisions such as Brown v. Board of Education, which ended segregation in American public schools, have overturned unjust laws based on moral codes that embraced unjust beliefs. The courts must continue to evaluate laws based on an objective view of whether they represent the intent of the Constitution rather than whether they comply with the moral codes of a certain group of people.