Is telling a lie legitimate when trying to avoid hurting people's feelings? For example; if my opinion was solicited by a not-so-good-looking person, would it be sinful not to tell the truth just to make them feel good about themselves? What do you suggest to do in such or a similar situation?
It is hard to really see a person as ugly nor not-so-good looking. Every person is the creation of God. Beauty and ugliness is a matter of taste, the one you see as ugly will be seen as pretty; or at least acceptable by someone else. Physical appearance is the least important personal trait. What is the most important are the spiritual ones. When one looks at an individual, one sees the person as a whole with his morals, intellect, spirituality and his physical appearance. The Holy Bible says, "Do not let your adornment be merely outward; arranging the hair, wearing gold, or putting on fine apparel; rather let it be the hidden person of the heart, with the incorruptible beauty of a gentle and quiet spirit, which is very precious in the sight of God" (1 Pet 3:3).
If you are asked a straightforward question like this; you could answer by praising the good qualities you find in this person and any of his/her physical traits like the color of the eyes, the style of hair. In any case a godly person is much better than a physically attractive one. "Charm is deceitful and beauty is passing, But a woman who fears the LORD, she shall be praised" (Prov 31:30).