The reason any solid will sublimate is that it only takes a certain amount of energy (E) to pull a molecule off the solid into the nearby gas or vacuum. The chance that a molecule gets that much random thermal energy will depend on the solid's absolute temperature T and on how big E is for the particular material. Since the odds of getting that much energy fall off as the Boltzmann factor e-E/kT
where k is Boltzmann's constant, they never quite go to zero no matter how big E is. However, they can get very, very small for big E, so some solids in practice just don't sublimate.
As for whether a solid will turn directly into gas or go through a liquid phase when it is heated in some container, that depends on the details of the binding energies of the solid and liquid and on the pressure applied to the material. Materials in which random liquid contacts are not nearly as low-energy as solid bonds are ones in which, at low pressure, the extra entropy of a gas beats the lower energy of the liquid, and the material goes straight from solid to gas. In principle, at low enough pressure, this can happen for anything.
(published on 10/22/2007)