In many ways a hat is a personal preference. Here is what to look for in a hat/visor. It should be of a tech fabric so that water is wicked off the skin. Most runners should look for a visor rather than a hat to help the head shed heat. there are follicle challenged among us as well as some who simply cannot have the sun on the top of the head. For those a hat with a mess top is a good choice.
One thing that all running hats/visors should have is a black colored under bill. Other dark colors work OK but black is the best choice in color. The black absorbs reflective radiation from the ground knocking the bright reflective light down and helping to keep your eyes from squinting. Squinting eyes are a stress riser signal to the body and that can lead to a tense face; then to a tense neck, shoulders and on down the body. HeadSweats is a leader in the market.
As far as glasses there are three things to look for. First - they need to ventilate or they will fog. Simply, they should not contact the cheeks so that more air can circulate around them.. Second, they should be light and not slip easily. The ear pieces should be the main source of grip to the head with the nose piece holding the glasses off the face. Finally, they need to have UV protection.
Hope this helps