Several creatures in the D&D world live in dark caverns, and dank forests, and only emerge, when they decide to, in the depth of night. Those creatures, when in the full light of day (or a spell that generates light) might suffer some penalties to attacks, proficiencies, skills, and the like, due to impaired vision from the blinding light.
OD&D[]
Goblins are the iconic creatures that suffer in bright light, taking a penalty to attacks and morale. Kobolds, orcs, and hobgoblins take the same penalty.
3e[]
The "light sensitivity" trait on orcs caused the "dazzled" condition in bright light. While dazzled, the orcs suffered a -1 penalty to attacks and certain visual skills.