It's not the American accent that changed...
In 1776, whether you were declaring America independent from the crown or swearing your loyalty to King George III, your pronunciation would have been much the same. At that time, American and British accents hadn't yet diverged. What's surprising, though, is that Hollywood costume dramas get it all wrong: The Patriots and the Redcoats spoke with accents that were much closer to the contemporary American accent than to the Queen's English.
It is the standard British accent that has drastically changed in the past two centuries, while the typical American accent has changed only subtly.
Traditional English, whether spoken in the British Isles or the American colonies, was largely "rhotic." Rhotic speakers pronounce the "R" sound in such words as "hard" and "winter," while non-rhotic speakers do not. Today, however, non-rhotic speech is common throughout most of Britain. For example, most modern Brits would tell you it's been a "hahd wintuh."
It was around the time of the American Revolution that non-rhotic speech came into use among the upper class in southern England, in and around London. According to John Algeo in "The Cambridge History of the English Language" (Cambridge University Press, 2001), this shift occurred because people of low birth rank who had become wealthy during the Industrial Revolution were seeking ways to distinguish themselves from other commoners; they cultivated the prestigious non-rhotic pronunciation in order to demonstrate their new upper-class status.
"London pronunciation became the prerogative of a new breed of specialists — orthoepists and teachers of elocution. The orthoepists decided upon correct pronunciations, compiled pronouncing dictionaries and, in private and expensive tutoring sessions, drilled enterprising citizens in fashionable articulation," Algeo wrote.
The lofty manner of speech developed by these specialists gradually became standardized — it is officially called "Received Pronunciation" — and it spread across Britain. However, people in the north of England, Scotland and Ireland have largely maintained their traditional rhotic accents.
Most American accents have also remained rhotic, with some exceptions: New York and Boston accents have become non-rhotic. According to Algeo, after the Revolutionary War, these cities were "under the strongest influence by the British elite."