From a variety of sources you can find the inspirations that the creators had for all of the emotions.
Here are quotes from director Pete Docter and producer Jonas Rivera, in a Q&A with the National Board of Review
How did you develop the visual language of this film?
Docter: It was really challenging. There were things that we felt were important early on that ended up boxing us in. Even having primary colors for all the emotions was difficult. I’m not saying this is easy, but with Nemo or Cars, you at least had a picture you could use – a fish or a car. But with this film, you can’t take a picture of an emotion. We relied on some verbal idioms like I feel blue, I feel sad, I’m about to explode with rage, etc. We would use those to start and the artists drew thousands of drawings.
Rivera: There are so many variables on what Joy could look like. I think it was Albert Lozano, our character art director, who was able to put forth what Pete suggested, that we wanted them to look like how our emotions feel. They came up with this very simple thing. Joy was a star, or a spark. Golden and illuminated. Sadness was a teardrop. So her shape and color resemble a teardrop. Fear is like a raw nerve, just a squiggly line, that’s why he’s tight. Disgust is the shape and color of a stalk of broccoli. And of course anger is a brick, immovable. So we put those shapes on the wall and that was the foothold and now let’s personify that. It just felt right to us. We didn’t want them to be little people. Pete said they should be made out of energy.
The Pixar Wiki for Inside Out says much of the same thing, but there's also a little bit more on the subject of design style and gender assignments.
Emotions, because of their nature, were made as strong, highly caricatured and distinctive characters, in a way Docter compared to the seven dwarfs from Disney's Snow White and the Seven Dwarfs. According to Docter, each emotion is based on a basic shape: Sadness on a teardrop, Joy on a star, Fear on a raw nerve, Anger on a fire brick and Disgust on a broccoli.
Continuing with the idea the mind is independent from reality, and in an effort to have emotions look the way one would feel them, emotions are not made of flesh and blood. As Docter says "They are made up of particles that actually move. Instead of being skin and solid, it is a massive collection of energy." Similarly, to animate them the team took a style with more stretching and exaggeration of movements than is usual for Pixar, closer to classic cartoon animation. Inspiration was taken from Chuck Jones and Tex Avery, as well as Milt Kahl and John Sibley.
Regarding how the genders of the emotions were chosen, the process was intuitive, according to Docter; he felt Anger was more masculine, while Sadness was more feminine. Casting was also an influence, notably for Disgust with Mindy Kaling. The main characters were made female also to reflect their location inside a girl's mind. Regarding the emotions of Riley's parents, he said: "We skewed them all male and all female for a quick read, because you have to understand where we are, which is a little phony but hopefully people don't mind!"