Is it bad to be underweight? I thought it is worse to be overweight?

Yes. Being underweight is bad. It increases the risk for osteoporosis. It can interfere with fertility and make pregnancy difficult. More importantly, what is the cause of being underweight? If due to severe calorie restriction, are there vitamin deficiencies? Is it due to illness? A normal bmi is 18-25. Mortality increases outside that range.
Extremes not good. Almost all of the medical lititure across a broad range of patients has shown pts with medically defined obesity and those with significantly lower bodymass index ie underweight pts, have worse outcomes.The obese pts have obvious issues. The underweight pt may be more suseptalble to diseases and less reserve when they do get sick.
Yes. If you look at the relationship between body mass index and ten-year survival, the "sweet spot" for longest survival occurs at a body mass index of 25. Below 25, and above 25, mortality increases. To view the relationship, see: http://www.Phvg.Org/bmi.Html.