Due to strong -R and -I-effect of the —$NO _{ 2 }$ group, electron density in the O—H bond decreases and hence, the loss of a proton becomes easy.
Now, after the loss of a proton, the o-nitrophenoxide ion left behind is stabilised by resonance and thus making o-nitrophenol a stronger acid.
In contrast, due to + R-effect, —$OCH _{3 }$group increases the electron density in the Q—H bond. Thereby, making the loss of proton difficult.
Now, the o-methoxyphenoxide ion left after the loss of a proton is destabilised by resonance. The two negative charges repel each other, thereby destabilising’-the o-methoxyphenoxide ion. Therefore, o-nitrophenol is more acidic than o-methoxyphenol.