Both James Madison and Thomas Jefferson were great defenders of freedom of religion, but they conceived of it in subtly different ways. Steven Waldman argues in favor of the Madisonian approach:
Madison’s success, politically and philosophically, came in part because he bridged Jefferson’s Enlightenment impulses with the views of the Baptists he got to know in Virginia. As a young man, Madison witnessed a shocking wave of persecution of local Baptists. . . . He imbibed, and agreed with, the Baptist argument that church and state should be separated—not to make America secular but rather to make it religiously vibrant.
In 1819, nearly two decades after the passage of the First Amendment, Madison was asked to assess whether the separation of church and state had worked well. Unsurprisingly, he offered a positive verdict, but the nature of his evidence was revealing. He pointed not to the decline in religious persecution but to the rise in [religious] enthusiasm. . . .
Jefferson, by contrast, focused on the threat that organized religion posed to freedom of thought. Unlike Madison, Jefferson in his writings exhibits a deep hostility to organized religion, both its modern and its ancient varieties. . . . Madison, [by contrast], believed that organized religion . . . was valuable and must, for the sake of the republic, be purified and strengthened.
Jefferson wanted religious freedom in order to end persecution and remove limitations on intellectual creativity; Madison believed that liberty would lead religion to flourish.