When am I ready for sunglasses?

Solution 1:

The Sunglasses Vendor will start outfitting Mario once you have collected 30 shine sprites.

The Sunglasses darken all light on the screen (Duh!) and can be toggled on and off by talking to said Vendor. Once you enter the final level, he will start outfitting Mario with a shine-sprite tropical shirt as well.

More on Mario Wiki

enter image description here

(note the darkened screen)