When is weight loss surgery appropriate for an obese person?

Depends. If a patient has failed conventional methods of losing weight and their bmi is now greater than 35 with an underlying history of medical conditions such as diabetes and htn, they are potentially a good candidate. Certainly lower bmis can be considered, however insurance requires a minimum bmi of 35.
Last resort. Weight loss surgery can be wonderful and life-changing. It is appropriate only after a really good effort at standard measures under supervision has failed, as long as the patient does not have too many risk factors to undergo the surgery in relative safety. Competent surgeons will require documentation of the good try at conventional wt. Loss strategies before doing surgery.
Weight loss surgery. Weight loss surgery is appropriate for obese patients with a body mass index over 40, or a bmi over 35 with medical complications directly related to their obesity (such as htn, dm, sleep apnea, heart disease, . ..). In today's world, the patient also needs to demonstrate a failure of all non operative attempts at weight loss with a full diet history. The success today is upwards of 90%.
Obese bmi 30-35. Bariatric surgery is appropriate for obese (bmi 30-35) based on 2011 decision by nih. Usually best for diabetics and patients with other severe comorbidities.

Related Questions

How is it that an obese person could lose weight with diet and exercise and not weight loss surgery?

Risk. So many things improve with diet and exercise (cardiovascular health, decreased cancer risks, joint health, stress, muscle tone, diabetes, etc) that the benefits are amplified many-fold. Weight loss surgery on the other hand basically puts your body in a situation where it starves. U lose the weight but do not gain the other health benefits. Surgery is for those who have no other good options.
Surgery. It would be ideal for an obese person to lose weight with diet and exercise. However, the reality is that 90% fail. That is why surgery is justified. Surgery is not the magic bullet though. You still need to eat healthy and exercise, but surgery helps to make it easier to lose weight.