The indigestible part of all plant-based foods pushes its way through the digestive tract, acting like a kind of internal broom. When it arrives in the colon, bacteria convert it to energy and compounds known as 'short chain fatty acids'. These are already known to alleviate the symptoms of colitis, an inflammatory gut condition. In several trials, people with colitis were given dietary fiber, resulting in beneficial anti-inflammatory effects. [1-5]
Similarly, food supplements called probiotics and prebiotics affect the balance of gut bacteria, and help to reduce the symptoms of inflammatory diseases, as well as asthma and rheumatoid arthritis. Breakthrough research from Sydney, Australia has now explained how this takes place by a mechanism that links diet, gut bacteria and the immune system. 
The research found that a molecule expressed by immune cells and previously shown to bind short chain fatty acids, also functions as an anti-inflammatory receptor. The scientists explained:
"We believe that changes in diet, associated with western lifestyles, contribute to the increasing incidences of asthma, Type 1 diabetes and other autoimmune diseases. Now we have a new molecular mechanism that might explain how diet is affecting our immune systems."
"We're also now beginning to understand that from the moment you're born, it's incredibly important to be colonized by the right kinds of gut bacteria,"
"The kinds of foods you eat directly determine the levels of certain bacteria in your gut."
"Changing diets are changing the kinds of gut bacteria we have, as well as their by-products, particularly short chain fatty acids. If we have low amounts of dietary fiber, then we're going to have low levels of short chain fatty acids, which we have demonstrated are very important in the immune systems of mice."
There is plenty of evidence to suggest that bacteria and their by-products play an important role in the human body. An American study published in 2006  compared the bacteria in the guts of obese and lean people. The obese people were put on a diet, and as they lost weight their bacteria profile gradually came to match that of the lean people.
Another study  looked at what diets might do to short chain fatty acid levels. Obese people were put on three different diets over time - high, medium and low fiber - and there was a direct correlation between the level of carbohydrate, or fiber, in the diet and the level of short chain fatty acids.
All this research provides many important reasons for eating considerably more unprocessed whole foods - fruits, vegetables, grains, nuts and seeds, which are vital sources of beneficial fiber. Many foods such as wheat bran, chick peas, dried fruits (apricots, peaches, figs and dates) and berries (raspberries and blackberries) have particularly high levels of insoluble fiber.