There are entire books about this subject, starting with the shift from "Puritan" Congregationalism to Unitarianism c. 1815. My general impression, though, is that Episcopalianism, at least as a political consciousness, was a reaction to the liberal excesses of the Unitarians (and Transcendentalists) c. 1850.
Do you recommend any of those books in particular?
Here is a good collection of primary sources on the Unitarian controversy:
https://archive.org/details/unitariancontrov0001unse/Most of what I know about this has come from articles or works on the period generally rather than one single source dedicated to religious changes; there are few good treatments of the topic.