This is because of the strong attractive electrostatic forces holding the oppositely charged ions together and a large number of ionic bonds in the crystal lattice. These require a lot of thermal energy to overcome and hence have both high melting and boiling points.