Unflattering things make you look bad, like an unflattering photograph your dad takes while you're eating a cheeseburger or the unflattering review of your band's first concert.
If the light is unflattering, it'll make people look tired or pale, or cast strange shadows that cause pictures you take of them to look terrible. An unflattering movie review makes the film sound boring or badly acted. When something is flattering, it compliments someone, or shows a person or a thing in its very best light, from the Old French root flater, "caress." Add the "not" prefix un-, and you get unflattering.