Joe Carter has what seems to me an offensive post over on First Things titled Guess Who Thinks We Should Legislate Morality? consisting mainly of a quote from a post by Anthony Esolen. The answer to "guess who" is "male homosexuals arguing for the right to marry." As I said in a comment:
What a bizarre and offensive piece. Since neither Joe Carter nor Anthony Esolen apparently believes there would be anything moral about same-sex unions, or that legalizing and encouraging same-sex unions would have the effect of making anyone more virtuous, how can they claim advocates of same-sex unions are tacitly endorsing the idea that you can “legislate morality”? What morality are they talking about?
From Carter and Esolen’s point of view, legislation favoring same-sex unions would simply be official authorization of immoral behavior in a new, state-sanctioned form, and would not have any effect in encouraging virtue. This comes close in my book to gay baiting. “You folks are appallingly immoral, you ask for something (same-sex marriage) that is absurd, and by doing so you — the personification of immorality — prove our point that morality can be legislated. The joke is on you!”
It seems to me that the saying “You can’t legislate morality” can be interpreted in a number of different ways, none of them particularly important, and it’s a pointless endeavor to try to prove the statement true (or false, for that matter).
Barry Goldwater, voting against the Civil Rights Act of 1964, remarked, "You can't legislate morality." Here's what Martin Luther King, Jr., had to say:
Now the other myth that gets around is the idea that legislation cannot really solve the problem and that it has no great role to play in this period of social change because you've got to change the heart and you can't change the heart through legislation. You can't legislate morals. The job must be done through education and religion. Well, there's half-truth involved here. Certainly, if the problem is to be solved then in the final sense, hearts must be changed. Religion and education must play a great role in changing the heart. But we must go on to say that while it may be true that morality cannot be legislated, behavior can be regulated. It may be true that the law cannot change the heart but it can restrain the heartless. It may be true that the law cannot make a man love me but it can keep him from lynching me and I think that is pretty important, also. So there is a need for executive orders. There is a need for judicial decrees. There is a need for civil rights legislation on the local scale within states and on the national scale from the federal government.
The question isn't whether you can "legislate morality." It's whether legislation can change behavior. The obvious answer is that it can, at least sometimes. But sometimes it doesn't, and sometimes it has unintended consequences. I don't think anyone nowadays would argue that Prohibition was a success.