Lead-free halide double perovskite (HDP) materials have received increased attention in the field of perovskite solar due to their non-toxic nature, structural stability and enhanced optical properties. In this work, we performed the density functional theory calculations to investigate the role of halide ion (X = Cl, Br, I) substitution in the lead-free Cs2AgSbX6 compound as a prototype structure. The results revealed that the halogen ions play a crucial role in changing the physical properties of Cs2AgSbX6. The halide ions play a major role in light harvesting as absorption of light mainly involves optical transitions from the p- to s-orbitals of the halide ions. Cs2AgSbX6 (X = C1, Br, I) exhibits enhanced light absorbance α (ω) and less reflectivity n(ω) in the near infra-red to the visible region of the solar spectrum which clearly indicated that the efficiency of solar cells can be enhanced. Moreover, the material showed an indirect bandgap of 1.38 0.88, and 0.395 eV (Cl, Br, and I). This study is a valuable reference for single-junction solar cells and tandem solar cells for enhancing the power conversion efficiency.