  Atmospheric nitrogen may be a necessary ingredient for the habitability of a
planet since its presence helps to prevent water loss from a planet. The
present day nitrogen isotopic ratio, $^{15}$N/$^{14}$N, in the Earth's
atmosphere is a combination of the primitive Earth's ratio and the ratio that
might have been delivered in comets and asteroids. Asteroids have a nitrogen
isotopic ratio that is close to the Earth's. This indicates either a similar
formation environment to the Earth or that the main source of nitrogen was
delivery by asteroids. However, according to geological records, the Earth's
atmosphere could have been enriched in $^{15}$N during the Archean era. Comets
have higher a $^{15}$N/$^{14}$N ratio than the current atmosphere of the Earth
and we find that about $5\%$ $\sim$ $10\%$ of nitrogen in the atmosphere of the
Earth may have been delivered by comets to explain the current Earth's
atmosphere or the enriched $^{15}$N Earth's atmosphere. We model the evolution
of the radii of the snow lines of molecular nitrogen and ammonia in a
protoplanetary disk and find that both have radii that put them farther from
the Sun than the main asteroid belt. With an analytic secular resonance model
and N--body simulations we find that the $\nu_8$ apsidal precession secular
resonance with Neptune, which is located in the Kuiper belt, is a likely origin
for the nitrogen-delivering comets that impact the Earth.
