From what I recall, the historical context behind the separation of church and state was informed partly by the older historical contexts that sparked the Protestant Reformation, reinforced further by political writing throughout the Enlightenment period, and partly by how the various colonies had previously had plenty of sectarian squabbles (Puritain persecution of the Quakers being the most notable example).
In addition, the other less-often-discussion spectrum of freedom of religion, concerning secular authorities interfering with matters of the church, has a pre-Reformation basis, informed by the various power struggles over who has the right to appoint bishops. And finally, the background of many of these early colonists, i.e. smaller Protestant sects from a mother country whose national church was (technically is, to this day the need for the monarch to also serve as the Supreme Governor of the Church of England is part of what's keeping the Act of Settlement 1701 afloat) explicitly Anglican, might've also held some influence.
Indeed, one of the protections outlined in the Establishment Clause specifically precludes establishing a national religion.
Relevant trivia of the day.