Yes, the sunglasses do work for preventing UV rays. Although sunglasses have the functionality of blocking UV rays, there are 3 main categories of sunglasses that can protect different degree of UV rays. Firstly, cosmetic sunglasses have lightly lenses that can prevent no more than 60% of sunlight and UVA UVA rays. This type is not suitable for wearing when you are driving in the day. The second one is called general purpose sunglasses, which can block 60% to 90% of visible light and UVA rays. It's effective for you to protect eyes when you are driving. The last one is special purpose sunglasses that block up to 97% sunlight and UVA rays. It's useful when you exposure under the sun for a prolonged period, but not for driving.