Silicon nitride (SiNx) based films have been recognized as essential dielectric films in the microelectronics and optoelectronics industry due to their desirable properties, such as high electrical insulation, excellent thermal stability, and compatibility with integrated circuit fabrication processes. They are also a potential candidate for fabricating wavelength-selective reflective coatings and surface passivation layers in building-integrated photovoltaics technologies. SiNx-based films are one of the popular choices for antireflective coatings in photovoltaics as well. Recently, SiNx and oxynitride (SiOyNx) based thin film optical filters have been explored to provide distinct color rendering to solar-charged electrical vehicles. Since solar cells have a lifespan of many years and the coating surfaces are substantial, it is essential to produce films with controlled optical and mechanical properties and maintain mechanical integrity against corrosion and wear. This study aims to design a deposition process and optimize minimal parameters for stable plasma conditions during multilayer deposition of SiNx and SiOyNx films using an electron cyclotron resonance plasma-enhanced chemical vapor deposition reactor with SiH4/N2/O2/Ar precursor mixtures at 120 °C. The primary goal was to investigate the influence of gas flow adjustments on the optical and mechanical properties, specifically targeting the refractive index and mechanical properties of the films. We measured the refractive index and the absorption of the films using variable angle spectroscopic ellipsometry. Then, we evaluated the mechanical residual stress ex situ using the wafer curvature measurement method. We have determined the elastic modulus and the hardness of the films using nanoindentation. The experimental results have shown a significant dependence of the optical and mechanical properties on the deposition parameters. To investigate the factors contributing to the intrinsic mechanical stress and to better understand SiNx film degradation mechanisms, we have studied the effect of postdeposition thermal cycling on the properties of the films. Several thermal-cycling experiments from room temperature to 400 °C were performed on different SiNx films, and the results showed an irreversible variation of the mechanical stress toward the tensile stresses caused by delamination of the films, while the refractive index remained unchanged.