You can and should use it always.
There is no disadvantage in principle.
However, there are very rare cases, where a lens hood can be "in the way".
- The lens hood can block an internal flash light, for very wide angles it could even block an extra flash on top of the camera. You would then observe some black shadow at the bottom of the image.
- When doing macros and the sujet or parts of the table etc. are very close to the lens.
- In combination with polarizing filters it may be difficult to actually rotate the filter to its most wanted position just because you cannot grap it with your fingers when it is inside the original lens hood. For all my filters I have rubber lens hoods with regular filter mounts which I screw on top of the filter so that rotating the filter is no issue at all. This may not work for ultra wide angles but works nicely for all regular focal length.
Besides these rare exceptions there is no reason to omit the lens hood. Lens hoods can only improve the image quality in contrast (and therefore the impression of sharpness) and color brilliance, not only when direct sunlight needs to be blocked.
Any time of the day, indoor, outdoor and studio.
In order to get the most out of your lens hood, make sure you use a proper one that fits well for the focal length that you are using. Especially for super zooms the original lens hood typically matches the short end of the focal range but for the medium or long end a rubber lens hood for that very focal length will provide you with much better results.