Specific species of nitrogen-fixing bacteria, such as Rhizobia, have a fascinating relationship with leguminous plants. These bacteria bind to the roots of leguminous plants, such as alfalfa, beans, clovers, and peas, and transform atmospheric nitrogen into fixed nitrogen which plants are able to utilize for their own development.
In part of this symbiotic relationship, nitrogen-fixing bacteria attach to the hairs of the roots on the host plants where bacterial populations begin to multiply, stimulating the formation of root nodules. Root nodules are enlargements of intimate associations of plant cells and bacteria.
Within these nodules, bacteria convert free nitrogen to ammonia, a compound which the plants can use for their own development and growth. Without this relationship, we would not have healthy crops.
Some studies have also shown that plant growth promoting rhizobacteria, including Bacillus species, can help protect plants from invasion with plant pathogens. In agriculture, farmers often add cultures of Rhizobium species to the soils of crops in order to boost plant health and reduce spoilage.
Source: Encyclopedia Britannica