Crystals of CdI2 and PbI2 were grown by zone melting. They were subjected to argon ion laser irradiation. Both time and intensity of radiation were systematically varied. The crystals of CdI2 were of type 4H while those of PbI2 were of type 2H. Their energy gaps were determined by UV spectrophotometry. The CdI2 crystals showed a linear variation of energy gap with intensity of radiation (0 to 125 mW), with the energy gap value decreasing from 3.28 to 3.11 eV, when the exposure time was kept fixed (7 min). When the time of exposure was varied, with the intensity of radiation fixed at 50 mW, the energy gap initially decreased from 3.28 to 3.07 eV and then gradually rose to be restored to the original value, thus showing a nonlinear variation. For the PbI2 crystals, the energy gap steadily decreased from 2.53 to 2.02 eV, when the intensity of exposure was varied. However, the value drastically decreased from 2.53 to 1.04 eV for the case of variation of exposure time. The results have been explained in terms of changes in phonon frequency, amount of absorption and anisotropy of thermal conductivity of the material.