That is a good question. Since women don't have them, they obviously aren't very important. Biologists consider them secondary sexual characteristics, meaning they allow individuals to tell at a glance whether someone is male or female. Mustaches and beards are not universal even on men. Native Americans, east Asians and Africans often have very little facial hair, suggesting that they weren't very necessary even as secondary sexual characters either. Besides, humans evolved in the hot African savanna, and our ancestors lost most of their body hair and had no need for facial hair because they get in the way of sweating and efficient cooling. Our ancestors probably wore no clothing either, so they probably don't need to take a look at the face to know who is male and who is female. Away from Africa, the environment may be different.