You can find lots of professional basketball players like to wear goggles very much, because it's pretty dangerous for them to compete with others. Especially for those players with near sightedness.
They can't wear glasses when they are in the game, contact lenses may also be dangerous to them. So they wear goggles with prescription which enables them stay in their good conditions.
Goggles can make them more cool by present the different colors and shapes. Most importantly, goggles are all comfortable wearing. Some brands provide players free goggles as well.