Quantum-statistical effects occur during the propagation of electromagnetic (EM) waves inside the dielectric media or metamaterials, which include a large class of nanophotonic and plasmonic waveguides with dissipation and noise. Exploiting the formal analogy between the Schrödinger equation and the Maxwell equations for dielectric linear media, we rigorously derive the effective Hamiltonian operator which describes such propagation. This operator turns out to be essentially non-Hermitian in general, and pseudo-Hermitian in some special cases. Using the density operator approach for general non-Hermitian Hamiltonians, we derive a master equation that describes the statistical ensembles of EM wave modes. The method also describes the quantum dissipative and decoherence processes which happen during the wave's propagation, and, among other things, it reveals the conditions that are necessary to control the energy and information loss inside the above-mentioned materials.