Nodule formation and nitrogen fixation are energy expensive. Several factors including pH influence leguminous plant and rhizobia growth and nodule establishment. Increased H+ concentration and increased solubility of the toxic metal ions Al3+, Cu2+ and Mn2+ are the primary causes of intercellular pH instability leading to growth inhibition in low pH soils. Legumes species differ in their nodulation and growth response to acidic soil. In low pH soil, nodule formation has been reported to be reduced by > 90% and nodule dry weight by > 50% in species such as soybean, pea, cowpea, Medicago and Lucerne. Phosphorus and Molybdenum deficiency in low pH soil hinder both nodule formation and nitrogen fixation, as the former is a component of ATP and the latter is a key component of the nitrogenase enzyme complex. Acid tolerant strains of many rhizobia species have been isolated with pH tolerance often being facilitated by proton exclusion, increased cytoplasmic buffering and acid-shock response mechanisms. The second approach relates to conventional methods such as liming to improve nodulation in low pH soils. For further details, I hope, following link may be useful to you:
Article Regulation of legume nodulation by acidic growth conditions
Dear Ravindra M. Muchhadiya Highly alkaline soils (pH >8.0) tend to be high in sodium chloride, bicarbonate, and borate, and are often associated with high salinity which reduce nitrogen fixation. Most legumes respond to these saline conditions by exclusion of sodium or chlorine or both ions from the leaves. Particularly salt-tolerant legumes include alfalfa and narrow-leafed lupins (L. angustifolius), which can grow in salinities equivalent to sea water. It has been argued that organic solutes such as proline and glycine enhance the salt tolerance of legumes and rhizobia. Intracellular accumulations of these solutes have been correlated with salt stress tolerance in R. meliloti (see the attachment). To my opinion, under such a situation, gypsum as the soil amendment may be applied to lower the soil pH. The second approach relates to selection of tolerant genotypes and strains of legumes and Rhizobia, respectively.
Soil factors highly influenced the availability of nutrients to the plant roots, biochemical reactions in the rhizosphere, activities of microorganisms etc. Among all the factors pH, moisture and temperature are most important. Highly acidic medium favors availability of most of the micronutrients in contrast to alkaline medium, particularly those required for microbial activities and root nodule formation.