Nitrate and nitrite are soluble compounds containing nitrogen and oxygen. Nitrate (NO3-) is more stable than nitrite (NO2-). This means nitrite easily changes into nitrate in groundwater and the results of a nitrate plus nitrite test are almost always predominantly nitrate. Because nitrate salts are very soluble, nitrate is highly mobile in soil and migrates readily to the water table when present in excess of the amount utilized by plants as an essential nutrient. Under anaerobic conditions, nitrate may be degraded to nitrite or denitrified. Biological activity in the soil is very important in determining the ultimate fate of nitrate.
All the above answers are correct. Just the oxygen content of water can drive the nitrite to nitrate. Any other oxidizer in solution will also oxidize nitrite. In some sample though nitrate can go to nitrite as on closer reading I see htat Jeremiah has noted above. These are samples that are contaminated with nitrogen-fixing bacteria. This can even happen when a lab water purification system has been compromised and is one of the reason most systems are flushed at least annually with hydrogen peroxide.