In order to truly see what legislating morality is all about, you have to take a look back to the founding of the USA. The writing of the constitution was heavily influenced by John Locke, who was also a supporter of natural rights and Social Contract Theory.
Social Contract Theory is a theory that tries to explain the origin of government. Essentially, it states that small human tribes created rules that assured group survival. You gave up the right to murder, in exchange for everyone else giving up the right to murder, thus increasing your own chances of surviving as well as the group's.
Now, if people had continued to follow the original system Social Contract Theory put in place, there would be no such thing as legislating morality. Legislating morality is when you begin to go beyond protecting the safety of one another and sacrificing rights, and move into the grey area of taking rights away for reasons that don't directly affect the tribe's survival (I say taking away because there's no way you could get the entire tribe to agree on a set of moral values). That my friends, is legislating morality.