It's generally recommanded if there is a morbid obesity (BMI over 40) assocated with worse conditions like invalid arthrosis, high blood pressure... etc.
A rigourous preoprative evaluaton must be done like upper endoscopy and a good psychological evaluation particulary of food behavior.
1.Body mass index (BMI) is 40 or higher (extreme obesity).
BMI is 35 to 39.9 (obesity),
2. Serious weight-related health problem, such as type 2 diabetes, high blood pressure or severe sleep apnea., high blood pressure or severe sleep apnea.
See the link: https://www.mayoclinic.org/tests-procedures/bariatric-surgery/about/pac-20394258
It is recommended when BMI is 40 or more( morbid obesity). Or BMI is 35 and associated with comorbidity like refractory DM resistant to multiple drug therapy or high dose insuline.