Normal frames similar to prescription eyeglass frames filter the light coming through the lenses but offer no protection from ambient light, direct light and glare from other angles. Wrap-around frames , larger lenses and special sidereal attachments can keep this extra light from your eyes. The material used to make the frames is often a huge factor in cost and durability. Also, the better sunglasses usually have features like tension springs connecting the arms to the face instead of just using screws. Just like shoes and suits, people associate certain brands with quality and extravagance.
Some companies spend huge amounts of money to advertise a brand and create an identity.
That cost is often passed on to the consumer in the product's price. If brand name is important to your image, then buying a brand name is important. However, it is possible to find high-quality sunglasses that don't have a brand name price. A place like REI often sells store-brand glasses of good quality at a much lower price. See the section on sunglass technologies for a complete description of specific technologies like polarization, photochromic lenses, anti-reflective coatings and so on.