Why do haloalkanes undergo nucleophilic substitution?
Haloalkanes undergo nucleophilic substitution because their electronegativity puts a partial positive charge on the α carbon atom.
All the halogens except iodine are more electronegative than carbon. Iodine has the same electronegativity as carbon.
That means that every carbon-halogen bond (except C-I) will have a δ⁺ charge on the carbon.
The positive charge makes that carbon susceptible to attack by a nucleophile.
Although the C-I bond is nonpolar, it is highly polarizable.
Imagine a negative ion approaching the bond from the back side of the carbon atom:
The approaching negative ion repels the electrons of the C-I bind and induces a δ⁺ charge on the carbon.
So alkyl iodides also undergo nucleophilic substitution.