Solubility of p-nitrophenol in various substances?
p-Nitrophenol is actually modestly soluble in water at neutral pH (16 g/l at 25 °C) because of its weak acidity ($p\mathrm{K_a}=7.16$ at 22 °C) and the formation of intermolecular hydrogen bonds between the phenolic OH group and water molecules. The latter would also explain why the compound dissolves in diluted $\ce{HCl_{aq}}$ despite being protonated at lower pH values. The importance of intermolecular hydrogen bonds is also demonstrated by the significantly lower solubility of the ortho isomer, which forms intramolecular hydrogen bonds and therefore appears to be less polar to the solvent (source):



In basic solutions, p-nitrophenol is deprotonated to p-nitrophenolate. The anion is stabilized by delocalization of the negative charge into the benzene ring and the electron-withdrawing nitro group (only two of the possible resonance structures are shown):