They area is hotly in debate with nearly a split decision between current dietary gurus. In my opinion it is an individual decision. Certainly, if you do eat beans, you would want to minimize any harm by proper handling. This includes soaking, then draining, then cooking (not slowly) then draining. This is too much for many. Canned beans have Bisphosphenal A, which is toxic.
Even with proper preparation, those with GI disorders or auto-immune disorders should avoid them. As they are high in sugar content, there is caution for diabetics or those concerned about weight (who isn’t?) On the positive side, there has been a study that showed these sugar and weight fears may be overdone. Longevity studies appear to be in beans favor.
Bottom line, I would not go out of my way to add these into your diet, and they may be acceptable for some patients in moderation, if not even health promoting with proper preparation. Eat cautiously.