The atomic structure and the electronic spectrum of a-SiNx:H films, which are grown by plasmachemical deposition with varied ammonia and monosilane flow rates, are studied. As a result of varied flow rates, stoichiometric parameter x is changed over wide limits, from 0.73 to 1.33. The films are analyzed by structural and optical techniques to determine stoichiometric parameter x and its influence on the valence band top and the band gap in the density of states. The experimental and calculated electronic structure parameters of a-SiNx are compared, and good agreement between them is achieved over wide film composition (parameter x) limits. The experimental data obtained can be used to simulate the electron transport characteristics in nonstoichiometric silicon nitride films, which is important for creating memristors based on them.