Becoming friends with another Sim allows greater social interactions, which are less likely to be rejected by the receiving Sim. This means that gaining a higher status relationship (Best Friends, Crush, etc.) is easier to achieve.
In The Sims, Sims became friends with each other when their relationship meter went over 50/100.
Originally there was only one meter in which to measure friendship, but with the release of the Hot Date expansion pack Sims now have two relation meters. One Daily meter, which measured a Sims' short term relationship status, this meter decayed rather quickly if a Sim didn't keep in contact with their friend, and a long term relationship meter. The long term meter measured the Sims' friendship over the long term and would take a while to both build up and decay.
The Sims 2Edit
The Sims 2 largely continued the Hot Date formula for friendship, but keeping friendships became far easier as their relationships decayed at a far slower rate than before. Different relationship levels were also given a different description if the player hovered over a Sim in the relationship panel.
The Sims 2 also introduced the Best Friend friendship level, which allowed Sims to become best friends after their long term relationship meter was high enough. This unlocked more social interactions for Sims.
The Sims 3Edit
In The Sims 3 friendship and relationships in general were given a slight overhaul. The long term relationship meter and the short term bar are now merged in to one. Because of this the progression from Acquaintance to Friend to Best Friend and the new BFF state are done linearly with the one bar. Friendships are also no longer represented numerically. Friendships do still decay but the decay seems to be slower. It is difficult to tell since there is no longer a number to look at, just a bar that fills up.
If a relationship decays below friendship, the other Sim now becomes a "distant friend", so they aren't lost as a friend. If the friendship decays more they become acquaintances again.