I think you are referring to ideas expounded by Dr. Steven Gundry in his book The Plant Paradox. He’s also got lots of YouTube videos. If you search the internet and read on both sides of the issue, you’ll find that his ideas are highly controversial. He says that lectins are bad for you, that you have both good and bad bacteria in your gut, that both kinds of bacteria are capable of sending signals to your brain, that lectins stimulate the bad bacteria, that the bad bacteria send signals to your brain that make you hungry for foods that make you fat and want even more lectins, that tomatoes, bell peppers, eggplant, brown rice, cashews, peanuts, and beans (and all legumes) contain a lot of lectins, etc. He says that taking probiotics is fine but the good bacteria don’t survive long if you keep eating lectins..
OK, fine. The problem I have with all this is: where is the clinical evidence for these theories? The studies he mentions were done only in rats and there are only n=1 anecdotal stories. What exactly is the biochemical reaction by which lectins promote the “bad” bacteria? How, biochemically speaking, do the bacteria signal the brain? By secreting hormones? By producing substances that inhibit certain enzymes? What is the mechanism of action on the molecular level? I can’t find it anywhere in his pronouncements. If someone is aware of good sources that back up these ideas, I would like to know.
Having said that, I don’t doubt that gut bacteria are extremely important for your health and that having the wrong kind may cause disease. Since you literally have trillions of them in your gut, they must be having some kind of impact. Unfortunately, there’s a lot we don’t know about them. To just say that all lectins are bad is, as @MrGrimm888 said, an oversimplification. It’s possible, for example, that if you eat lectins, along with other foods, they’re not bad for you at all.