The Declaration of Independence takes most of its main ideas directly from John Locke. Locke was one of the most significant influences on the Americans who wanted to become independent from Great Britain.
In his Second Treatise on Government, Locke tells us that there is a “law of nature” that says that
no one ought to harm another in his life, health, liberty, or possessions…
This language is closely mirrored in the Declaration’s assertion that God has given all people the right to “life, liberty, and the pursuit of happiness.”
Locke also makes most of the other points that the Declaration makes. He says that governments only have the right to rule if the people consent. He says that the reason for having government is to protect the rights that the “law of nature” mentioned above gives the people. He says that when the government does not protect these rights, the people have the right to overthrow that government. All of this is essentially identical to what the Declaration says.
In these ways, we can see that John Locke’s writings had a tremendous influence on the Declaration of Independence.