The Declaration of Independence of the United States was signed on July 4th, 1776 in Philadelphia at the Pennsylvania State House (now known as Independence Hall). There were various purposes behind this Declaration but the major purpose was for the thirteen American colonies to become sovereign states that no longer wanted to be a part of British rule.
Apart from this, it was a work for public relations, i.e. a document that was meant for the people who disliked Great Britain and supported independent colonies.
At that time, colonies had already separated themselves from Great Britain and had formed their own body of government, system, and army. As soon as colonies decided to cut their bond with Britain, Congress created an official document, called Declaration of Independence. Thomas Jefferson was the main author of this document and it was created by the committee which had five members. Thomas explained that the government should support the colonies instead of forcing them to be a part of Great Britain.
This is one of the reasons that Americans celebrate their Independence day on the 4th of July as their Declaration of Independence was signed on this day.