Why does mineral halite has a cubic crystal ? Is this a result of the way by which sodium ions and chloride ions are held together ? And what is the relation between the cubic crystal of halite and its cleavage ?
Halite has a cubic structure as a result of its ionic bonds and ion sizes. This means that the positively charged sodium tends to be surrounded by as many negatively charged chlorine ions as possible (and vice versa) but that attraction is working against the repulsion of positive charges from each other and negative charges from each other. It balances nicely with cubic packing of the atoms.
This does control the cleavage direction but there are other cubic minerals where the ion sizes and charge mean the cleavage is stronger in different directions. A good example is fluorite, calcium fluoride, which often forms cubic-shaped crystals but has octahedral cleavage.