The structure, elastic, electronic and optical properties of two-dimensional (2D) MI2 (M = Pb, Ge, Cd) under strain are systematically studied by the first-principles method. It is proved that the monolayer structure of 2D-MI2 is stable by phonon spectra. Moreover, the large ideal strain strength (40%), the large range of strain and the elastic constants of far smaller than other 2D materials indicate that the single-layer PbI2 and GeI2 possess excellent ductility and flexibility. By applying appropriate strain to the structure of 2D-MI2, the band gaps of single-layer MI2 can be effectively controlled (PbI2: 1.04 ∼ 3.03 eV, GeI2: 0.43 ∼ 2.99 eV and CdI2: 0.54 ∼ 3.36 eV). It is found that the wavelength range of light absorbed by these three metal iodides is 82–621 nm, so 2D-MI2 has great absorption intensity for ultraviolet light in a large wavelength range, and the strain of structure can effectively regulate the optical parameters.