what is a lens hood used for
No, but with an explainaton. A lens hood will not help you when the sun (or light source) is actually in your shot. While it can help reduce extra light from reflected objects nearby (windows, white walls, etc.), the effect is minimal. But in reality, you should use the hood whenever you can.