Recently, inorganic metal halide perovskites, APbI3 (A = K, Rb, and Cs), have attracted increased attention in the research community of photovoltaic technology due to their superior stability and exceptional structural, electronic, and optical properties. In this paper, the influence of biaxial compressive and tensile strains (−6% to +6%) on the optoelectronic properties of APbI3 perovskites is thoroughly investigated using density functional theory, based on first-principles calculations. Additionally, this study identifies the function of the A-cation in the optoelectronic properties of APbI3. We find that the biaxial strain in APbI3 can significantly increase its absorbance, both in the visible and ultraviolet light energy range. Interestingly, the absorption coefficient, dielectric function, and electron loss function are tuned into visible ranges when a compressive strain is applied, whereas these functions move into the ultraviolet region for tensile strain. Furthermore, the electronic band structure shows that the APbI3 compounds are all semiconductors with direct bandgap ranges of 0.92–1.09 eV and 1.9 eV at the R-point. The value of the bandgap decreases to 0.17, 0.25, and 0.32 eV for KPbI3, RbPbI3, and CsPbI3, respectively, when the spin–orbit coupling effect is considered. Moreover, the bandgap of APbI3 shows a decreasing trend and tends towards the metallic condition when compressive strain is applied. In addition, when tensile strain is increased, the bandgap of APbI3 exhibits an increasing trend. Therefore, based on the optical and electronic properties, applying a biaxial strain should make APbI3 compounds suitable for optoelectronic device applications.