The process in which microorganisms convert atmospheric nitrogen into ammonia compounds that can be used by plants.