Whether the government has the right to legislate morality is better asked in terms of the objective of laws. Are they for the protection of the people and communities or are they also to set a social, religious and moral standards by which all should follow?
Examine these two views: "There are good reasons to believe that morality derives from religion", and "There are good reasons to believe that morality is independent of religion." To what extent is one of these views stronger than the other.
We need idealistically moral people to stop people in power from doing the immoral things, to give people someone to follow, and to give the people someone to learn from.