I was wondering as OP and I watched the fireworks last night what the origination of doing that was… Well, I found my answer.
From here originally:
On July 8, 1776, the first public readings of the Declaration were held in Philadelphia’s Independence Square to the ringing of bells and band music. One year later, on July 4, 1777, Philadelphia marked Independence Day by adjourning Congress and celebrating with bonfires, bells and fireworks.
The custom eventually spread to other towns, both large and small, where the day was marked with processions, oratory, picnics, contests, games, military displays and fireworks. Observations throughout the nation became even more common at the end of the War of 1812 with Great Britain.
On June 24, 1826, Thomas Jefferson sent a letter to Roger C. Weightman, declining an invitation to come to Washington, D.C., to help celebrate the 50th anniversary of the Declaration of Independence. It was the last letter that Jefferson, who was gravely ill, ever wrote. In it, Jefferson says of the document:
“May it be to the world, what I believe it will be … the signal of arousing men to burst the chains … and to assume the blessings and security of self-government. That form, which we have substituted, restores the free right to the unbounded exercise of reason and freedom of opinion. All eyes are opened, or opening, to the rights of man. … For ourselves, let the annual return of this day forever refresh our recollections of these rights, and an undiminished devotion to them.”
Congress established Independence Day as a holiday in 1870, and in 1938 Congress reaffirmed it as a holiday, but with full pay for federal employees. Today, communities across the nation mark this major midsummer holiday with parades, fireworks, picnics and the playing of the “Star Spangled Banner” and marches by John Philip Sousa.