Photosynthesis is the process by which plants convert solar energy into usable energy. Plants use light energy from sun, water and carbon dioxide to form glucose molecules, oxygen and energy (in the form of ATP molecules). It is this oxygen that we (and other animals and life forms) breathe and survive. The process also provides us with food and the energy generated is used for plant growth and maintenance.
The nitrogen cycle is strongly affected by the photosynthetic process in multiple ways. Plants are an integral part of the nitrogen cycle. Plants take up nitrogen in the form of nitrite, ammonium or nitrate ions. This nitrogen is released back to the environment when they die. Plant's capacity to incorporate the nitrogen is obviously affected by its growth and health, something for which photosynthesis is directly responsible. Also, a number of nitrifying bacteria (that convert ammonia to nitrite and then nitrate) are aerobic and require the presence of oxygen for functioning. This oxygen is provided by the photosynthesis process, which maintains the level of oxygen in our atmosphere.
Hope this helps.