We present an experimental and theoretical study of the optical absorption of amorphous silicon oxynitride films. The optical absorption coefficient-alpha in the energy range from 4 to 10 eV has been measured for SiOxNyHz films between the nitride and oxide compositions grown by plasma-enhanced chemical vapor deposition. We have also calculated the coefficient-alpha for SiOxNy alloys assuming a random mixture of Si-N and Si-O bonds within the disordered alloy. The variation of the optical gap E(g) with the composition and the appearance of steps in the optical absorption for oxygen-rich samples are discussed.