Please note that the Declaration of Independence was not a written law (so the verb "passed" does not quite work here), but instead, a statement proclaiming the purpose of the new nation, the United States, and its literal declaration of independence from England.
On July 4, 1776, the Declaration of Independence was signed in Congress by representatives from all the former colonies, now states: Georgia, Massachusetts, Connecticut, Rhode Island, Vermont, New Hampshire, Pennsylvania, New York, New Jersey, Delaware, Maryland, Virginia, North Carolina, South Carolina, and Georgia.
The Declaration of Independence, written during the Revolutionary War (1775-1783), also described the reasons why the former colonies decided to release themselves from their king. The document accused King George III—and all previous kings—of tyranny and "repeated injuries and usurpations."
The war ended in 1783 with the signing of the Treaty of Paris. The new nation then set out to concretize and amend its laws—originally laid out in the Articles of Confederation— in a Constitution that, after two conventions, was ratified in 1787.