From A Little History of Religion by Richard Holloway:
If daring to know how nature worked was one of the impulses of the Enlightenment, another was disgust with centuries of religious violence. Superstition was bad enough. War was worse. The thinkers of the Enlightenment noticed how religions always disagreed with each other. Each believed it possessed the truth revealed by God and the others were wrong. And when it got control of a country it tried to make everyone march to its drumbeat. That was bad enough. It was worse if there were just two religions in a country competing against each other. They would be at each other’s throats all the time, as they had been in Europe since the Reformation. But if there were thirty religions they all seemed to live in peace!
The Enlightenment drew two conclusions from this. The first was the the more religions there were in a society the safer it would be for everyone. So the best guarantee of peace was to outlaw discrimination and practise toleration. Their second conclusion was that, while religion should be tolerated within society, it should never be given control over society. The authority of religious leaders should be confined to their own faith communities.
It was only in the USA that this principle was ever strictly enforced. The authors of the American Constitution had been influenced by Enlightenment thinking on religion. They remembered how America’s first settlers had fled religious persecution in Europe. And they were determined to avoid it in their new promised land. That is why Thomas Jefferson, one of the authors of the Declaration of Independence and third resident of the young republic, advised the American people to ‘make no law respecting an establishment of religion or prohibiting the free exercise thereof’. They should build a wall between Church and State. And that became one of the founding principles of the USA.