How do you account for the fact that while there existed religious freedom in some colonies, it was denied in other colonies?
I know that the Spanish believed religious uniformity was essential in order for a society to flourish. The Puritans, ironically, were opposed to religious freedom, for it violated their central beliefs. And others, like Roger Williams, believed in a separation of the church and state. Are there any other reasons for this?
The colonies' provision of religious freedom depended on the beliefs of their founders. As you state, the Puritans did not permit religious freedom, as they founded a theocracy in the Massachusetts Bay Colony that merged church and state; to them, other religious were heathenish. Rhode Island was founded in reaction to Puritan intolerance. Roger Williams, who was banished from the Massachusetts Bay Colony because he believed in the separation of church and state and did not think it was fair to take land from Native Americans, founded Rhode Island as a religiously tolerant colony in 1636.
Maryland was tolerant of both Catholicism and Protestantism, as King Charles I had granted Lord George Calvert a charter for the colony. Calvert envisioned the colony as a safe place for the practice of Catholicism, as he was Roman Catholic, and the Toleration Act of 1649 explicitly granted Catholics the right to practice their religion. However, a Puritan revolt in the 1650s challenged the right of people to practice Anglicanism and Catholicism until the Calvert family squashed the rebellion. Pennsylvania was founded as a religiously tolerant colony because its founder, William Penn, was a Quaker whose father was owed money by King Charles II. To pay off the debt, Charles II granted land to Penn, who, following Quaker beliefs, forged peaceful relationships with Native Americans and allowed for religious tolerance.
Often, chance played a role in which colonies allowed religious freedom. For example, Georgia had at first not permitted Jews to enter the colony. However, when the colonists were trying to survive the first summer in Savannah and the illness it brought, a ship with Jewish passengers arrived, including a doctor who ministered to the colonists and helped them recover. In return, James Oglethorpe, founder of the colony, allowed the Jewish passengers to stay in Georgia and to practice their religion.
All of the colonies exhibited religious freedom to some extent, empowering some religious groups more than others. Based on the beliefs of the sponsoring governments or, more often, businesses or partnerships that were financing the settlement and development of a particular colony, religious groups that were favored were given a greater degree of freedom than groups whose tenets were not in line with the sponsors' beliefs.
The areas first settled by immigrants from France, Portugal, and Spain brought their Roman Catholic beliefs with them. Florida was heavily Catholic as a result. Areas further north were settled by varied groups, each of which largely established its predominant faith as being the official church of the corresponding colony. Other faiths were accepted or tolerated to varying degrees. Maryland, as influenced by Roger Williams, was the only colony to specifically incorporate the idea of separation of church and state from the beginning, extending complete religious freedom to persons of all faiths.
The particular groups that were accepted in a given area were determined by the heritage and beliefs of the settlers and sponsors of that settlement. If those beliefs were intolerant of differences, the religious tolerance of the new colony was not very lenient; if the first residents were willing to accept differences in beliefs and practices, the colony allowed for and welcomed a wider variety of faiths.