The answer is its founding text (U.S. Constitution), the Bible and the God of the Bible!
Righteousness exalts a nation
Proverbs 14:34
Our Founders almost universally taught that for liberty to exist and be sustained there must be character (virtue, morality) in the people. They further believed that Christianity was the religion that produced the moral character to sustain our liberty in a Republic. Founding Father Benjamin Rush was typical of their thinking:
“The only foundation for… a republic is to be laid in Religion. Without this there can be no virtue, and without virtue there can be no liberty, and liberty is the object and life of all republican governments.”
Bear in mind when reading the Founders that religion at that time in America was defined as Christianity. Noah Webster, the undisputed authority for the meaning of American English of that era, defines religion as, “…a belief in the being and perfections of God, in the revelation of his will to man, in man’s obligation to obey his commands, in a state of reward and punishment, and in man’s accountableness to God; and also true godliness or piety of life, with the practice of all moral duties.”
Evidence in our history demonstrates that Christianity produces Biblical morality, which produces Biblical government, which allows for the most liberty for all citizens. Furthermore, a Biblically based Republican form of government allows for Biblical Christianity to flourish rather than be stifled by or persecuted by governments.
So this Fourth of July, let us pray for repentance, revival, and reformation so that God may grant us true liberty both internally (freedom from sin) and externally (freedom from the tyranny of men).