Humans show aggression by baring their teeth, dogs show aggression by growling and cats, by hissing. All groups of animal show aggression in a way that makes it clear to attackers that they are agitated. How do these aggression signs evolve? Is it random or does it have to do with evolutionary factors. Let's say, for example, I wanted a human-like creature to naturally hiss as a sign of aggression, How can I achieve this?
Fighting is an expensive hobby, evolutionarily. Even if you win a fight, killing the other animal, you may have sustained substantial trauma (such as wounds). A brutal example is abscesses which occur from cat fights. Cat teeth are so sharp and needle like that they can deposit bacteria deep where the other cat's body just can't get it out.
Accordingly, when there is contention over something, both parties have something to gain if they can find a less violent way of working out the disagreement. The loser gets to live, and the winner gets to avoid the risk of getting wounded. Thus, very few fights are actually to the death (unless one animal is prey).
The barring of teeth and other similar symbols of aggression are just that: symbols. They are showing the other party exactly what kind of a fight they're in for, and gives an opportunity for some additional communication before the fight breaks out.
From an information theory perspective, this is information which would be useful in a fight (you're more likely to win if the other guy doesn't know what you're capable of), but when you account for the Pyrrhic victory which comes from winning the fight but losing more to injuries than you actually won from the engagement, it starts to be worth trying to come up with such symbols.
There are evolutionary effects which shape what these responses look like, but if you want to control them (such as your example of wanting to have a humanoid hiss), you can look to the environment. A sign of aggression is patently useless if the other party fails to interpret it as such. If your humanoid lives in an area with animals or other humanoids which see hissing as a sign of aggression, your humanoid will adapt.
In film, we can see these patterns. Consider the Na'vi of Avatar, who hiss. It bars their quite capable teeth, which is the evolutionary side of it, but from the way James Cameron built his world, its not hard to see the environmental effects. Their symbols of aggression are the symbols which work at conveying meaning in their environment.
Showing aggression in all the cases you've listed as examples consists of "showing what you've got" to hurt the agitator.
Dog: "I will use these teeth on you"
Cat: "I will use these teeth, and these claws, on you" (imagine one-paw-up fighting position)
Human: (I actually don't think of "baring teeth" as the human sign of aggression. I usually think of puffing up and yelling. But let's say it is, because I'm sure we probably would have used teeth in the past, in desparate situations we still do)
In general, if an animal is willing to hurt another animal in defense, it will display the method of how it plans on defending itself. It usually displays itself in a way that doesn't happen in normal "happy" activity - so it won't be mistaken for something else.
Exception One: Snakes and other subtly dangerous animals. Snakes cannot really display their venom. They developed other ways of warning agitators. Sounds and unmistakable visual methods (hoods or coloring) train other animals to avoid them over time. Sounds and visual cues can help for any animal where just sound or just vision might not.
Exception Two: All talk and no bite. Other animals just happen to evolve to match the truly dangerous animals. By having similar indications of danger they can protect themselves without actually evolving venom or etc.
So, to put it into terms of "How do these signs evolve?", it comes down to what ended up being the easiest (actually, "first successful") way to display your threat level (and maybe even being capable of bluffing, without actually teaching other animals that you aren't a threat when they test it).
The easiest way to display how threatening you are is to display the physical features capable of inflicting pain. Since animals tend to have voices, it could also help to include an audible way of signalling. (It was apparently important enough for rattlesnakes to evolve rattles!) Failing that, animals evolve their own methods, which tend to differ from "normal" animals in their ecosystem. (With the exception of those which evolve to copy them)
Why do cats hiss? Because that's the sound they are capable of making which naturally bares teeth and isn't used for other communication.
Why would a human-like creature hiss? Because they have voice-capabilities similar to cats.
Why a (intelligent) human-like creature (with the same voice capabilities as actual humans) wouldn't actually say, "Get out of my face before I destroy you" probably comes more from culture and language, rather than evolution.
Both growling and hissing also involve baring teeth. Revealing one's teeth to an enemy is a warning that you are armed and dangerous; teeth are weapons. The growling and hissing sounds some animals make alongside the teeth-baring gesture are basically just meant to make the message stronger and more obvious, associating a sound with the action.
As for the specific sounds of a low growl, higher growl, or hiss, I personally can't say why they evolved for specific Earth animals, but it may not be all that important. I can easily imagine a human hissing or growling, perhaps only as a joke, but still a learned response--an imitation of another creature. Along those lines, here are a couple of hypothetical reasons why your species might naturally hiss instead of yell or growl:
- They already have high voices. Their vocal cords don't make low sounds very well, so a hiss would come more naturally than a growl.
- The hiss is an imitation of another animal that hisses when angry and dangerous. For example, perhaps your species hisses when threatened because a certain species of poisonous lizard or snake that lives in the area does the same thing, so the hissing sound is immediately associated with danger.
And here are a few that favor a growl over a hiss:
- They already have low voices. The inverse of point #1 above. Related: the lower the pitch of the growl, the stronger the creature seems, since it implies that the creature is bigger.
- The growl imitates a large local predator, such as a big cat. Related to point #2 above.