Because the colonies were part of the British Empire, Britain's wars affected them. The clearest example of this was the French and Indian War.
This war was part of a broader worldwide struggle between England and her ally, Prussia, and a coalition of France, Spain, Austria, and Russia. This European war had a huge impact on the colonies. It pulled colonial men into fighting with the French in North America. Perhaps more importantly, it led the government of Britain to try to take more control of the colonies through increased regulation and taxation. This was what led to the American Revolution.
Wars that involved Britain necessarily impacted the British colonies in North America, with the French and Indian War being the war that had the most impact.