  A new model atom of nitrogen was developed using the energy levels of N I
from laboratory measurements and also predicted in atomic structure
calculations and the most up-to-date atomic data for computing radiative and
collisional rates of the transitions. Solar abundance
$\log\varepsilon_{\odot,N}$(1D NLTE) = 7.92$\pm$0.03 was determined from lines
of N I by applying the synthetic spectrum method with the plane-parallel (1D)
MARCS model atmosphere and taking into account the departures from local
thermodynamic equilibrium (non-LTE = NLTE effects). Having implemented the
3D-corrections of Amarsi et al. (2020), we obtained
$\log\varepsilon_{\odot,N}$(NLTE+3D) = 7.88$\pm$0.03 for the Sun. Based on high
spectral resolution spectra, the NLTE abundances of nitrogen were derived for
11 unevolved A-F type stars with reliable atmospheric parameters. Non-LTE leads
to strengthened N I lines, and the non-LTE effects grow with increasing
effective temperature. For each star, non-LTE leads to smaller abundance error
compared to the LTE case. For superficially normal A stars, non-LTE removes the
enhancements relative to the solar nitrogen abundance obtained in the LTE case.
A $\lambda$ Boo-type star HD 172167 (Vega) also has close-to-solar N abundance.
The four Am stars reveal a scatter of the N abundances, from [N/H] = -0.44 to
[N/H] = 0.39. The N abundances of the Sun and superficially normal A stars are
consistent within 0.09 dex with the nitrogen abundance of the interstellar gas
and the early B-type stars.
