The nose color is unrelated to glare.
The nose of the aircraft contains antennas, and in order to avoid impairing transmission and reception of signals (including radar, as this is a common location for radar antennas), the nose of the aircraft must not be made of metallic materials. Usually it is made of fiberglass or composite. It also requires special paint which, in the past, only came in a limited number of colors.
The nose is also very subject to abrasion since air, rain, and someimes hail are hitting it at hundreds of miles per hour. Some nose materials can become porous to water over time, and when the water freezes, it damages the nose further, and eventually can get inside. Water in the nose cone also interferes with radar returns. So the nose must be kept water tight. Some aircraft have a plexiglas nose cover for this purpose, others use a rubberized material.
So it all depends on the aircraft and the airline's individual choices. Even within a fleet and on the same model of aircraft, the nose color may vary. In the old days, there were fewer options available, so the nose cone was often simply black.
Some aircraft have a small area painted black right in front of the cockpit windows to reduce glare, but that's not the reason for having an entirely black nose (the pilots don't stand beneath the airplane while flying, so obviously a nose that is black all the way around would not further reduce glare).