Dim has several meanings related to a lack of light, hope, or knowledge. A room that is not well lit is dim, a slow thinker is dim, and when life looks hopeless, your prospects are dim.
To dim a light is to dull it, like by putting a shade over it. A vague idea without a lot of specifics is also dim, since it's hard to see or understand the idea. Someone who's not very bright is dim or a dimwit. When things are hopeless, they're dim too. For example, if a football team is losing by fifty points, their chances of winning are dim.