The answer relates to the strength of the interactions between the component units that make up a crystal or a solid.
The reason why anything is a solid at a given temperature is, crudely, that the interactions between the units that make up the solid (atoms, ions or molecules) are stronger than the amount of thermal energy available at that temperature.
Diamond, for example, is a solid because each unit carbon is bonded to its neighbours by a strong carbon-carbon bond that takes a great deal of energy to break. Non-polar molecular compounds, like candle wax (in reality a mixture but imagine a pure long chain hydrocarbon to keep it simple) are held together by the intermolecular forces between the molecules (often called dispersion or Van der Waals forces). These are much weaker than chemical bonds and depend on the surface area of the molecules. So small non-polar or not-very polar molecules tend to have low melting points. Hexane is a volatile liquid. The shape and symmetry of the molecule matters a bit to these interactions so toluene is a liquid down to -95°C but benzene, which is very similar to toluene but far more symmetric and slightly flatter only melts at about 6°C as the molecules pack together better encouraging stronger interactions. Polar molecules have stronger interactions because the molecular dipoles interact and this produces stronger forces than the non-polar dispersion forces. So phenol (very similar in size to toluene but far more polar) melts at about 41°C.
Simple ionic solid are made from charged ions. Table salt crystals consist of Na+ and Cl- ions. The key interaction between these is electrostatic and this is a strong force that takes a lot of energy to break. The melting point is about 800°C. Permanent electrostatic interactions are strong especially if the components can get close (remember, it's an inverse square law). This explains why not every ionic compound is a solid. There are ionic compounds that are liquid at room temperature. These tend to consist of molecular ions that are large and sometime irregular so forcing structures where the ionic force has to act over much larger distances and, therefore, be much weaker. An example is [BMIM]PF6 which has a melting point well below room temperature:
These ionic liquids are an interesting area of research in chemistry as they sometimes enable much less wasteful chemical reactions in industry (see wikipedia).