How was the Continental Army able to drive British forces out of Boston?
The Continental Army was able to put cannons on the heights overlooking Boston Harbor which made occupying Boston impossible.
The Continental Army was able to bring cannons from fort Ticogdaroga and place them on the heights overlooking Boston Harbor.
The cost of storming the heights was deemed to be too costly in view of the British "victory " on Breed's hill. Leaving the cannons on the heights made British ships in the Harbor vulnerable to being shelled by the the colonists.
The British felt they had no choice but to evacuate Boston.