In order to acquire a reasonable description of the structural, electronic and optical properties of the perovskite compound \(\hbox {CsPbI}_{3}\), first principle calculations have been computed by density functional theory implemented in the WIEN2k code. The calculations are presented within PBE-sol for exchange correlation functions coupled with modified-Becke–Johnson (mBJ) exchange potential. The (001) surfaces of \(\hbox {CsPbI}_{3}\) for varying thicknesses have been constructed using the Structeditor program implemented in the WIEN2k code. The lattice constant, band gap and DOS have been computed. The \(\hbox {CsPbI}_{3}\) bulk and surface exhibit a direct band gap located at the R symmetry point of the Brillouin zone. The band gap approaches experimental values when the exchange correlation function is coupled with mBJ. The optical properties of \(\hbox {CsPbI}_{3}\) were computed in terms of dielectric properties, refractive index, extinction coefficient, absorption coefficient, conductivity, reflectivity and energy loss. The direct band gap nature and high-absorption power of the surfaces of \(\hbox {CsPbI}_{3}\) in the (001) direction in the infrared, visible and ultraviolet energy range make it suitable for use in optical and optoelectronic devices.