Too much teeth in smiles have been associated with unfriendliness, but a little curve of the lips and a little teeth invokes a friendly gesture in both adults and babies. On the other hand, nearly all other animal species views teeth as a threat. How did the same expression change so much for the human race?
Frank McAndrew, who studies facial expressions, explains that teeth do not always mean something threatening. For example, in primates teeth held together is a sign of submission. Perhaps the human smile evolved from that. Furthermore, the combination of different kinds of expressions are important when analyzing if something seems unfriendly or not. When teeth are bare and the lips are pulled back, it emanates a threatening expression, as if the subject is about to bite. However, when teeth are shown with relaxed lips, reflects an amicable signal.
McAndrew goes on to say how these types of behaviors and our interpretation of them are innate. That is, evolution has worked its way to "program" such expressions. Babies who are born blind can smile appropriately in the right conditions that other sighted people do!
Source material from Scientific American