I assume that you shot these photos somewhere on a college/university campus. Presumably in a common area of a dorm, a library or the student union?
I absolutely agree that low light and under exposure are the root cause of the problem but, further, I might add that most public areas in college buildings have icky light for photography. Usually fluorescent and/or indirect incandescent which often produces flat, lifeless and difficult to expose lighting conditions.
The human eye quickly adjusts to those conditions but cameras don't. Consequently, you have to be more conscious of the light you are shooting under when you go from one lighting condition to another, especially when shooting indoors.
For example, the first two shots probably came out crummy because you were in the middle of a room where there was little or no direct light. Only diffuse, room light. In the second two shots you seemed to be near a window or under a light fixture which gave you better, more direct light.
Bottom line: Learn to watch your light and use that to achieve the picture you want.
I don't know how many times I have been sizing up a picture and passed on it because the light wasn't what I wanted.
People often look confused when I tell them, "I don't like the light."