Just like those used on an astronaut's helmet, these reflective visors can help in better visibility when facing the sun (or any bright light source). But the windshields of most aircraft (commercial and military) look transparent from both sides. The whole point behind the question is to find out if it was experimented and if yes, why was it dropped?
I'll assume you're referring to astronaut helmets only because of their sunglasses-like reflective properties against visual light, not other wavelengths.
There are some small efforts by manufacturers to add some reflective coatings to their windshields. The 787 has a window coating by PPG that had a gold-based heating film that also reflected infrared light- useful because a cockpit can heat up quickly. Military jets like the F-16 can have golden-tinted "Have Glass" cockpit windows but that's to reduce radar cross section, not to filter visual light.
There are several reasons visible-light reflective windshields are never seen. The first is that optically it's very difficult to have reflection only go one way. Reflective coatings work well for sunglasses and some car windows because the light coming in can be assumed to be much brighter than the light going out, so glare from inside is not a huge problem. In an aircraft, where that tiny light on the horizon could be a several-ton aircraft closing in fast, the requirements for night vision are a bit higher. It should be noted that, for cars, reflective or tinted windshields are illegal in the USA for a number of reasons, including visibility.
The second reason is that bright outside light is a solved problem, so we don't have to resort to desperate measures like permanent reflective tinting. Sunglasses use by pilots, even though not strictly necessary, is so widespread there's literally a style of sunglasses named "aviators" and the FAA has a safety brochure on selecting sunglasses (AM-400-05/1). If the pilot doesn't like sunglasses, they can use sun visors and sun screens that may be part of the aircraft or provided by the airline.
Reflective materials cut down the amount of light let into the cockpit, which is useful in very bright sunlight, but would be undesirable at night. At night these materials could potentially blind the pilot, so you would have to make these materials retractable somehow, which would add complexity and weight. Over time these coating would be damaged by airborne debris, smashed bugs, and regular wear and tear. Add this that these coatings are expensive - outfitting them would be a significant cost.
Add to this that ever pilot would have different tinting needs - some people with less sensitive eyesight would need less tinting and others more. It's far cheaper and more effective for people to simply buy sunglasses.
How would that supposed to be working?
If you were normal glasses, you never ever thought about wearing sun glasses all the time, right? Because in so many situation, you do not need sun glasses.
As pointed out, even astronauts don't use it if they are not exposed to the sun (it's like a sun glass to them). So it's an obvious decision to let the pilots wear sunglasses.
These are adjustable and work like a big sun glass. They are however not overlayed with gold like no sun glass is. This is simply because there is no need for such a strong protection. We have the atmosphere that reduces the sunlight even further, the astronauts don't.
Go for a drive at night, with your headlights off and sunglasses on. Actually, don't. I don't want you to die.
Now imagine doing the same thing while landing a highly flammable tin-can with hundreds of lives counting on you, except this time the sunglasses are glued to your face.
You can see how this is a terrible idea for anything but daytime flight, right?
(This answer pertains to military application)
A reflective windshield would increase the chances of the aircraft being seen. This is often NOT desirable in military application. The enemy being able to see that very shiny canopy reflecting light at them would increase the chance of being shot at.
Even a regular fighter jet's canopy reflections can be a detriment to the pilot. Dirty canopies reflect more light, and it is a crew chief's responsibility to keep that canopy clean, both to prevent the pilot from having issues seeing, and to prevent them from being seen. As a crew chief, I'd been blamed more than once for my pilot 'losing' in training missions because he was easily seen by others due to reflections off his canopy (I wasn't always too keen on polishing them.)