The second President (or tenth if you consider John Hanson the first) wrote to Thomas Jefferson on June 28, 1813:
The general principles on which the fathers achieved independence were. . . . the general principles of Christianity. . . . I will avow that I then believed, and now believe, that those general principles of Christianity are as eternal and immutable as the existence and attributes of God; and that those principles of liberty are as unalterable as human nature.
However, Adams is often quoted as saying, “This would be the best of all possible worlds, if there were no religion in it!”
However, here’s the complete quotation in an April 19, 1817, letter to Thomas Jefferson:
Twenty times in the course of my late reading have I been on the point of breaking out, “This would be the best of all possible worlds, if there were no religion at all!!!” But in this exclamation I would have been as fanatical as Bryant or Cleverly. Without religion, this world would be something not fit to be mentioned in polite company, I mean hell.