Sorry to burst your bubble, but sunglasses will block all
forms of light, and polarized sunglasses will do even worse.
Sunglasses will also darken other things around you, not just the light, but things that you would normally see as darkened, you wouldn't be able to see at all. However, most optometrists make regular glasses with coatings to help block some of the glare that you are talking about. I have really bad trouble with headlight glare, and my optometrist offered the option of the anti-glare coatings. They don't completely get rid of the glare, but they help somewhat. Try increasing your intake of Beta-kerotine, such as foods like carrots, you can also buy beta-kerotine vitamin supplements, as well as a supplement called bilberry. British fighter pilots in WWII reported increased nightvision after eating bilberry jam.
Hope this helps!