One has to make a distinction between army, as in the Continental Army directly answerable to the Continental Congress, and militia, with far less military training and discipline.
The Continental Army was generally equipped with the standard military smoothbore musket using a round ball smaller than the bore, designed for fast reload, and to be fired in volleys. Accuracy was terrible with smoothbore muskets: no rifling and the loose fitting bullet tended to rattle around as it moved down the barrel. The idea was to take a unit and turn it into a giant shotgun by firing volleys on command, letting random chance do the rest.
For the most part, the Continential Army, or any formal army of that time, couldn't target enemy officers, because their muskets did not have the accuracy to reliably hit an individual at even 50 yards. Whether the policy of not targeting officers was a gentleman's agreement, or just a byproduct of the inaccuracy of available weapons, would make for an interesting debate.
The colonial militia were another matter - most were untrained, many were unarmed volunteers, and those that were armed, were equipped with whatever they had, a 'shoot what you brung' affair. Armed militiamen often were woodsmen, already equipped with a Kentucky Rifle, a lightweight firearm expressly designed for accuracy (and expressly designed to be used in dense forests, but that's another story). These could reliably hit a person at up to 100 yards.
Did the militiamen deliberately target officers? The closest I could find was this account of Tim Murphy (maybe) shooting General Simon Frasier, after Daniel Morgan had told his men to deliberately target Frasier. The loss of Frasier contributed greatly to the defeat of the British in that battle - an event that was to be mirrored in US civil war when Sgt ER Grace killed General John Sedgwick at the Battle of Spotsylvania Courthouse (at a range of over 800 yards, using a Whitworth Rifle), leading to the defeat of the Union forces.
It should be noted that Morgan's unit was technically part of the Continental Army, but was formed from local, self equipped militia, and had a high number of long range rifles as opposed to smoothbore muskets. So it is not unreasonable to theorize that Morgan and his troops were not disciplined soldiers, and Morgan's orders to target Frasier were a matter of personal initiative and not formal policy promulgated by army leadership.
Also, officers of that day tended to stand out, as they wore more elaborate uniforms than enlisted men, and usually were on horseback. By standing out, they make themselves tempting targets for a marksman at a distance. The militia and individual sharpshooters were already using the unconventional tactic of firing from cover at great distance, using the increased accuracy to make up for lack of numbers. Selecting the most obvious target would be a natural extension of targeting individual soldiers at great (for the time) distance, so it is quite possible that a lot of British officers were shot by marksmen simply because they were the most visible target.
Still, I can find no reference that the formal Continental Army deliberately targeted British officers as a matter of policy.
In a twist, a British officer, Col Patrick Ferguson (of Ferguson Rifle fame), did not shoot General George Washington, when he had an opportunity to do so at the Battle of Brandywine - Ferguson did not want to shoot a gentleman in the back.
The term 'sniper' was not really in use at that time. Back then, the correct term was 'sharpshooter' or 'marksman', as in a person who possessed above average shooting skills, typically using a rifle of above average accuracy.