A lot of keepers don’t like caps because it hinders peripheral and upwards vision – even when there is sun.
Oddly enough, I know one keeper who will only wear a cap when it’s raining because he tells me the ph content in rainwater can hinder vision and also cause sore eyes – but if the sun is cracking flags he won’t wear one.
I’ve never played professionally in goal though so don’t think I’m qualified to offer a firm opinion either way.