Why are magnesium chloride and calcium chloride more soluble than sodium chloride?
I don't think there is any simple answer.There are some rules of thumb, all of which have exceptions. Most chlorides are soluble. That includes both MgCl2 and CaCl2.

Solubility is the result of the balance between competing interactions: between the ions in the salt and between those ions and the water.

Many factors contribute to the solubility of a compound in water. In this case, the main difference between the compounds is the bonds’ strength.

The longer answer is to do with something called the "enthalpy of solvation".'

you can think it this way that the lattice enthalpy in MgCl2 and CaCl2 will be less and can be easily be overpowered by hydration enthalpy