Bacteria is important to the nitrogen cycle because it breaks nitrogen down that is in the soil into a more simpler form that plants can use.
If bacteria didn't, plants wouldn't be able to intake the nitrogen and do photosynthesis, so we wouldn't get oxygen.