This study systematically investigates the effects of Cs, Ag, In, and Cl vacancy defects on the structure, electronic, and optical properties of perovskite materials through density functional theory calculations. The research demonstrates that different vacancy structures lead to a reduction in the stability of the structure, with Cs2AgInCl6: VCl showing the least impact and Cs2AgInCl6: VCl exhibiting the most significant impact. The vacancies alter the conductivity of Cs2AgInCl6, where Cs2AgInCl6: VIn and Cs2AgInCl6: VCl exhibit p-type and n-type conductivity, respectively. Cs2AgInCl6: VCs and Cs2AgInCl6: VAg remain direct bandgap semiconductors with band gaps of 2.672 eV and 3.859 eV, respectively. Additionally, the study investigates the real and imaginary parts of the dielectric constants as well as the optical absorption coefficient to explore the material's optical properties. Regarding optical properties, different vacancy defect systems exhibit distinct absorption capabilities in the visible and ultraviolet light ranges, with the material demonstrating optimal optical performance as the incident photon energy increases. These research findings provide essential references for a deeper understanding of perovskite materials' properties and optimizing the performance of optoelectronic devices. Future research can further explore the influence of other defect types and external conditions on material properties to expand its potential applications in solar cells, optical communications, metamaterials, and other fields.