Question
Question: Which is most acidic and why? A. 
B. 
C. 
D. 
Solution
Use the concept of inductive effect and mesomeric effect. Compare the inductive effect of the NO2 group at different positions. Hydrogen bonding also plays an important role while comparing the acidity of compounds. It can be intramolecular hydrogen bonding.
Complete answer: Let us suppose that H+from each compound is removed. Then, the remaining Oxide ion (O−)must be stabilized by the Nitro group.
NO2 group has both (−I)and (−m)effect. Hence, it supports the acidic nature of compounds. With the help of (−m)effect, the conjugate base (Oxide ion)gets stabilized after removal of H+.
Nitro is an electron withdrawing group. It will withdraw electrons of Oxide{\text{ ion}}$$$\left( {{O^ - }} \right)$$through these two effects.
By inductive effect, it withdraws electrons, but it is an effect which is based on distance unlike mesomeric effect.

Thus, the phenoxide{\text{ ion}}soformedafterlosingtheproton{H^ + }mustbestabilizedbyresonance.Thenegativechargepresentonphenoxide{\text{ ion}}mustbedelocalizedintoabenzenering.Nitrogrouppresentatmeta−positioninm - nitrophenol,cannotstabilizephenoxide{\text{ ion}}ascomparedtoo - nitrophenolandp - nitrophenol.Also,inp - nitrophenol,thereisachanceofhydrogenbonding.(HydrogenfromOHandNitrogenfromN{O_2}group).So,itishardtolosetheproton{H^ + }duetoH - BondingwithN{O_2}group.Now,therewillbemoreresonanceeffect,thusmorestabilizationofcompoundp - nitrophenol.Thereforethesearetheresonatingstructuresofp - nitrophenol.Thus,inp - nitrophenol$ there is Stabilization due to resonance and inductive effect too.
Hence, the correct answer is (D).
The most acidic is:

Additional information:
NO2 Group do not show mesomeric effect of meta-position in benzene ring. Inductive effect is distance dependent. Hydrogen bonding occurs between Hydrogen, Nitrogen and Oxygen. Hydrogen bonding can be intermolecular and intramolecular.
Note:
While comparing the acidity of the different compounds, always remember the inductive effect and mesomeric effect. The stability of phenoxide ions gives us the order of acidity. More stable theoxide ion(O−), the more its acidity. The order of basicity is just the reverse of the order of acidity.
