The AAO and AOA advise against buying sunglasses that promise to block UV radiation but don't say how much is blocked. If they don't block 100% of UV radiation or say UV absorption up to 400nm, don't buy them.
Either plastic or glass lenses can soak up UV light, but the protection of either can be improved by the addition of a clear UV coating. According to the AAO and AOA, mirror coating and gradient tinting of lenses don't offer UV protection. The color and degree of darkness of lenses don't mean the lenses can block UV rays. Polarized lenses block glare, but offer no UV protection. Photochromic lenses, or lenses that change from light to dark when exposed to UV rays, may offer protection. Wraparound sunglasses keep light from shining on your eyes from the sides, offering more protection. Polycarbonate lenses offer 99% UV protection.
For comfort, sunglasses should be free of distortion and imperfection. Look through the glasses at arm's length and move them slowly across, up and down over a square pattern like a floor tile. If the lines sway or wiggle, the lenses are imperfect. You also should check lenses to make sure the color is exactly the same throughout.
If you play sports, consider getting special lenses made from polycarbonate plastic that protects them from breaking. Also, get them with a coating that protects them from scratching.