
The nitro-group is art electron withdrawing group. The presence of this group in the ortho position decreases the electron density in the O-H bond. Also, the O-nitrophenoxide ion formed after the loss of protons is stabilized by resonance. Hence, O-nitrophenol is a stronger acid.
On the other hand, methoxy group is an electron releasing group. Thus, it increases the electron density in the O-H bond and hence, the proton cannot be given out easily. For the is reason, O-nitrophenol is more acidic than O-methoxyphenol.