In most cases mean bees are from a genetic trait and can be corrected by
requeening. Remember not to expect immediate results because it takes at least
six weeks for the new queen's daughters to make up the largest percentage of the
colony.
If a colony was fine but became mean look for the possibility of a failing
queen. This of course can be corrected by requeening.
If a colony became mean very fast look for other things that may be upsetting
them. A tree branch rubbing on the hive, skunks, tall grass or weeds in front
of the hive, bumblebee or mouse nest under the bottom board. Sometimes its not
you they are mad at but you are just the last straw.
I had a colony in a yard that was mean. I was moving to another yard and was
going to requeen it there. A week after moving it I went to requeen it and it
was as nice as can bee. I did not rqueen it and it was fine for the rest of the
season. Go figure.