The light absorption and transmission of monolayer MoS$_{2}$ in a one-dimensional defective photonic crystal (d-1DPC) is theoretically investigated. The study shows that the strong interference effect decreases photon density in particular areas of the microcavity. The d-1DPC can reduce light absorption of monolayer MoS$_{2}$ and enhance light transmission. The impact of monolayer MoS$_{2}$ light absorption on the localization effect of photon is investigated when monolayer MoS$_{2}$ and the organic light-emitting diode are located in the same microcavity. However, monolayer MoS$_{2}$ does not reduce the localization effect of light by regulating the position of monolayer MoS$_{2}$ in the microcavity.