There are two main reasons why free public education became widespread in the United States during this time. One reason was the rise of Jacksonian democracy. The other was the reforming instinct that arose out of the Second Great Awakening.
During this time period, the United States was becoming much more democratic. This was the era in which all white men over the age of 21 came to have the right to vote (the right had previously been restricted to some degree to men who owned property). It was the era in which politics became much more open to the common people. Because of this, there came to be a sense that even the common people should be well-educated. This would make them more able to participate fully in American democracy.
This was also a time when many reform movements were active. It was the time, for example, when abolitionism started up and when temperance movements arose. This happened because of the Second Great Awakening. That religious revival encouraged people to think that they, personally, could perfect themselves. This led also to the idea that they could perfect their society. The institution of free public schools was the way that one group of reformers felt that society could be perfected.