The most important function of sunglasses is to protect the eye against UV radiation. When they don't adequately filter ultraviolet (UV) light, it may even be worse to wear them than not to, because the dilation of the pupil will mostly be dictated by the amount of visible light falling into your eye.
I have several pairs of sunglasses lying around at home, but of most of them I don't know how well they block UV light. Is there any simple way to find out? More generally, is there any simple way to detect UV radiation? For example, to see infrared light (at least in some frequency range) you can use a digital camera, or (in an even more narrow band) an IR thermometer. Are there similar ways to detect UV?