It's a basic Buddhist teaching that appearances can be deceiving, and things often are not as they seem to be. This is doubly true of the wrathful deities of Buddhist art and scripture.
These iconic characters are intended to be terrifying. They bare sharp tusks and glare from various numbers of angry eyes. Often they wear crowns of skulls and dance on human bodies. They must be evil, right?
Not necessarily. Often these characters are teachers and protectors. Sometimes their monstrous looks are intended to frighten away evil beings. Sometimes their monstrous looks are intended to frighten humans into diligent practice. Especially intantric Buddhism, they illustrate that the poisonous energy of negative emotions can be transformed into a positive, purifying energy.
Many wrathful deities appear in theBardo Thodol, or Tibetan Book of the Dead. These represent the harmfulkarmaa person created in his life. A person who runs from them in fear is reborn in one of the lower realms. But if one has wisdom, and recognizes that they are projections of one's own mind, they can do no harm.