The low value of ionisation energy means the metal atom can be easily converted to M+ and high value of Electron affinity means the nonmetal is easily converted to X-.
As the formation of M+ and A- is an important step, the lattice energy (energy release during the formation of 1 mole of an ionic compound) it depends on the above two factors.