If you use compost, you probably won't need to add nitrogen. Nitrogen is released naturally from dead organic matter so compost is great for that and you probably wont need to add more. If you do for some reason though, and you are preparing you bed or pots ahead of time, you can add green plant matter, such as lawn clippings and till or mix it in. They are a great source of nitrogen (much better when they are still green than when they are dry). If you have already planted and think you need more nitrogen, the you can get things like high-nitrogen fertilizers to add. Often ones for lawns and other leaafy plants are higher in nitrogen. Just be careful because as stated above, an excess of nitrogen can cause problems as well. It can actually slow down plant growth, cause the leaves to become leathery, will reduce flower and fruit/seed production, and in excess can cause ground water pollution because it is easily leeched below two feet or so.
Wood ashes (from a fireplace) can be used to increase phosphorus as well as potassium and some other nitruents, and it can be used to raise the soild pH. Because wood ashes can cause root burn if added when the plants are growing, this is best done during the winter. If you think you need to add more when yur plants are already in, you can get a high-phosphorus fertilizer like a starter fertilizer and use that.
If you are concerned about nutrient and pH levels, you can always get your soil tested to see how it needs to be ammended before you plant and when your plants are already int he ground.