The differences between the melting points of these compounds are due to the intramolecular hydrogen bonds.
Melting point is a particular temperature at which a pure compound melts from its solid to liquid under a particular pressure.
Hydrogen bonds are the attraction between the hydrogen attached to one oxygen, fluorine, or nitrogen atom by another electronegative moiety. Here in the ortho nitrophenol, we can see that the hydrogen of the hydroxyl group attached with benzene ring has a very close electronegative structure, the oxygen of nitro group. with which it can form hydrogen bonds. So these hydrogen bonds are intramolecular hydrogen bonds. Whereas in para nitrophenols, the hydrogen of hydroxyl group is situated opposite to the nitro group. So it can form a hydrogen bond with nitrogen of next molecule by intermolecular hydrogen bonds and can form a temporary polymer. This increases the force of attraction between the successive molecules increase the melting point of these compounds than ortho nitrophenols.