Independence Day, commonly known as the Fourth of July, is the annual celebration of nationhood. It commemorates the passage of the Declaration of Independence by the Continental Congress on July 4, 1776.
The Congress had voted in favor of independence from Great Britain on July 2 but did not actually complete the process of revising the Declaration of Independence, originally drafted by Thomas Jefferson in consultation with fellow committee members John Adams, Benjamin Franklin, Roger Sherman and William Livingston, until two days later. The celebration was initially modeled on that of the king's birthday, which had been marked annually by bell ringing, bonfires, solemn processions and oratory. Such festivals had long played a significant role in the Anglo-American political tradition. Especially in the 17th and 18th centuries, when dynastic and religious controversies racked the British Empire (and much of the rest of Europe), the choice of which anniversaries of historic events were celebrated and which were lamented had clear political meanings.
The ritual of toasting the king and other patriot-heroes—or of criticizing them—became an informal kind of political speech, further formalized in mid-18th century when the toasts given at taverns and banquets began to be reprinted in newspapers.
Reference: http://www.history.com/topics/july-4th