Experienced beekeepers report that there are some colonies that are consistently nasty and aggressive - they will buzz out anyone coming near and sting at the smallest provocation or even without one. But these are exceptions. Any colony may become very aggressive, but do not put a "nasty colony" label on it after a single mishap. Bee colonies are a bit like us - they have good days and bad days. On a bad day ANY colony will be nasty. The same colony, a few days later, may resemble a congregation of sweet little flying lambs.
A colony will easily become aggressive if it is facing a stress factor. What could it be? Not much to forage, an attack by wasps or robber bees, internal in-the-hive problems such as problems with wax moth larvae, bad (for them) weather coming etc. etc. I heard experienced beekeepers complaining that bees are very nasty when foraging on grey box trees. I do not believe that nectar would make them nasty, but grey boxes flower very late in season when hardly any pollen is available. Perhaps they were desperate for pollen to replenish their numbers reduced by heavy foraging - good enough (for me) reason for them to be stressed.
Stress factors may not always be visible to an observer. I like to quote Michael Bush, a beekeeper not only with exceptional experience but also gifted with lots of common sense. Here is his approach:
Sometimes a hive is cranky because of conditions, vandals throwing rocks, bees trying to rob them, etc. I do the "three strikes you are out" method of deciding. If I open a hive and they are cranky and I think they have cause (rainy, windy, late in the day etc.) then I don't count that. If I don't think they have cause, I put a red push pin in the top box. The next time I open them, if they are nice, I remove it. If they are mean again, I add another push pin. If they get to three, I requeen. They should be allowed to have a bad day.
Here is an interesting letter from a lady beekeeper:
Just my two cents....had an aggressive hive last year in my yard. One time after checking on the hives, their reaction was more aggressive than normal. They followed me 100 feet away, a dozen or so buzzing and banging into my veil. Over a short time, my backyard become a "no go" zone in the daytime. The aggression escalated; they would fly over my house into the front yard and chase us. However, I noticed it was never more than a half a dozen or more. Long story short, couldn't requeen them at my location but could no longer tolerate the aggression. I very begrudgingly planned on killing the hive (dry ice), even set a date. (I don't even kill spiders!)
A very trusted, LONG time beekeeper told me to leave them alone for a while and they would likely resolve their problem. Took her advice and they did resolve their issue within about 8 weeks. They are a VERY honey productive hive and are now calm. So glad I took the advice.
So if you face an angry colony, leave them alone and give them some time to recover. And if they "get three red pins" as per Michael - re-queening is the only known remedy, but this is neither easy nor pleasant.