When religion has rule over law, you have a violation of human rights. You don't have freedom of religion unless the government is neutral, and doesn't force anyone's religion on them, like in a theocracy, or eliminate all religion, like in communism. A good government is one that makes laws based on no religion.
Religion claims moral authority not from some rational measure of its good, but by the coercive authority it believes is held in the powers of its deity. In essence, religion tells us: "My god is all-powerful, so you're lucky that whatever he makes you do is also in your best interests, and if you disagree then you're ignorant, sick or evil."
That's moral paternalism, which neither needs democracy nor, in the end, will it tolerate it. In fact, moral paternalism is only a short legislative step from tyranny.
If you want to keep democracy then you can't have religion making laws. The moment religion legislates on your behalf, it will legislate its belief in moral authority into law, and you'll see heresy become a felony, dissent become immorality, diversity become a sin, clergy set above the people, and you'll be living under the Taliban.
It's debatable how much benefit religion has in a modern society, but if has a social benefit then it's to inspire and not coerce, and that's why it must be kept separate from government.
Essentially, in a democracy, the state is responsible for organizing and protecting the people and day-to-day affairs of the country.
The Church is an organized institution regulating the structure of a particular belief and behavior pattern.
Mixing beliefs with governance is bad enough.
Having an organized church meddle with the state can lead to the state taking actions that are not in the best interest of the people.
While secularism can be good total secularism is bad. Today many songs and to shows display obscene language and images. This is due to the rise of secularism. If governments and society go full secular they would purge people of faith and virtue. An example of a total secular society was communist Russia. Stalin purged Christians in his country and saw them as subhuman. Lastly religion offers moral and guidance to society.