The wrathful (or terrifying deities) are representations of negative karmas, in the same way as peaceful deities are representations of positive karmas.
Many wrathful tantric beings are represented as blue in colour because they embody the transmuted energy of hatred and aggression, into wisdom and enlightenment.