From Merriam-Webster:
Main Entry: 1mor·al
Pronunciation: 'mor-&l, 'mär-
Function: adjective
Etymology: Middle English, from Middle French, from Latin moralis, from mor-, mos custom
Date: 14th century
1 a : of or relating to principles of right and wrong in behavior : ETHICAL <moral judgments> b : expressing or teaching a conception of right behavior <a moral poem> c : conforming to a standard of right behavior d : sanctioned by or operative on one's conscience or ethical judgment <a moral obligation> e : capable of right and wrong action <a moral agent>
2 : probable though not proved : VIRTUAL <a moral certainty>
3 : having the effects of such on the mind, confidence, or will <a moral victory> <moral support>
- mor·al·ly /-&-lE/ adverb
synonyms MORAL, ETHICAL, VIRTUOUS, RIGHTEOUS, NOBLE mean conforming to a standard of what is right and good. MORAL implies conformity to established sanctioned codes or accepted notions of right and wrong <the basic moral values of a community>. ETHICAL may suggest the involvement of more difficult or subtle questions of rightness, fairness, or equity <committed to the highest ethical principles>. VIRTUOUS implies the possession or manifestation of moral excellence in character <not a religious person, but virtuous nevertheless>. RIGHTEOUS stresses guiltlessness or blamelessness and often suggests the sanctimonious <wished to be righteous before God and the world>. NOBLE implies moral eminence and freedom from anything petty, mean, or dubious in conduct and character <had the noblest of reasons for seeking office>.
Main Entry: 1law
Pronunciation: 'lo
Function: noun
Etymology: Middle English, from Old English lagu, of Scandinavian origin; akin to Old Norse log law; akin to Old English licgan to lie -- more at LIE
Date: before 12th century
1 a (1) : a binding custom or practice of a community : a rule of conduct or action prescribed or formally recognized as binding or enforced by a controlling authority (2) : the whole body of such customs, practices, or rules (3) : COMMON LAW b (1) : the control brought about by the existence or enforcement of such law (2) : the action of laws considered as a means of redressing wrongs; also : LITIGATION (3) : the agency of or an agent of established law c : a rule or order that it is advisable or obligatory to observe d : something compatible with or enforceable by established law e : CONTROL, AUTHORITY
2 a often capitalized : the revelation of the will of God set forth in the Old Testament b capitalized : the first part of the Jewish scriptures : PENTATEUCH, TORAH -- see BIBLE table
3 : a rule of construction or procedure <the laws of poetry>
4 : the whole body of laws relating to one subject
5 a : the legal profession b : law as a department of knowledge : JURISPRUDENCE c : legal knowledge
6 a : a statement of an order or relation of phenomena that so far as is known is invariable under the given conditions b : a general relation proved or assumed to hold between mathematical or logical expressions
- at law : under or within the provisions of the law <enforceable at law>
synonyms LAW, RULE, REGULATION, PRECEPT, STATUTE, ORDINANCE, CANON mean a principle governing action or procedure. LAW implies imposition by a sovereign authority and the obligation of obedience on the part of all subject to that authority <obey the law>. RULE applies to more restricted or specific situations <the rules of the game>. REGULATION implies prescription by authority in order to control an organization or system <regulations affecting nuclear power plants>. PRECEPT commonly suggests something advisory and not obligatory communicated typically through teaching <the precepts of effective writing>. STATUTE implies a law enacted by a legislative body <a statute requiring the use of seat belts>. ORDINANCE applies to an order governing some detail of procedure or conduct enforced by a limited authority such as a municipality <a city ordinance>. CANON suggests in nonreligious use a principle or rule of behavior or procedure commonly accepted as a valid guide <the canons of good taste>. synonym see in addition HYPOTHESIS
I have heard "You can't legislate morality" many many times. It's one of my pet peeves. Of course you can. You just can't codify all morality. But every law ever passed was legislating morality. Morals are not concerned with our thoughts. Morals are our behavior. A moral person is someone who conforms to a standard of right behavior.
A law is simply a standard of right behavior that some kind of authority enforces. Every law ever written prescribes some type of behavior (either directly or indirectly).
Not all standards of right behavior can be enforced. Sometimes people disagree about what the right behavior is. Sometimes there's no objective way to measure the behavior. For instance, it's pretty damn hard to prescribe clearly what a good father does. At least not in clear, specific, 100% applicable, prescriptions on actions to take. You can create a vague standard, but our Constitution requires laws to be clear and not vague.
But the idea that you can't legislate morality is false. Usually people who make the statement just don't know what the definition of morality is (i.e., they think morality is concerned with a person's thoughts).