o-hydroxy benzaldehyde has higher intramolecular H-bonding than p-hydroxy benzaldehyde while the p-isomer has higher intermolecular H-bonding than o-hydroxy benzaldehyde.
Intermolecular H-bonding is stronger than intramolecular H-bonding. So, p-isomer is solid and have higher melting point while o-isomer is liquid.