In recent years, two-dimensional (2D) lead-free double perovskites have been attracting much attention because of their unique performance in photovoltaic solar cells and photocatalysis. Nonetheless, how thickness affects the photoelectric properties of lead-free double perovskite remains unclear. In this work, by means of density functional theory (DFT) with a spin orbit coupling (SOC) effect, we have investigated the electronic and optical properties systemically, including band structures, carrier mobility, optical absorption spectra, exciton-binding energies, band edges alignment and molecule adsorption performance of Cs2AgBiBr6 with different thicknesses. The calculated results revealed the thickness-induced band gap and optical performance for Cs2AgBiBr6. It shows a low band gap and outstanding optical absorption of visible and ultraviolet light. When the thickness is reduced to a monolayer, Cs2AgBiBr6 moves from an indirect band gap to a direct band gap. Moreover, the carrier mobility of Cs2AgBiBr6 is excellent and the exciton-binding energy increases with the decreased thickness. Importantly, an analysis of molecule adsorption and band edge alignment indicates that Cs2AgBiBr6 is prone to H2O adsorption and H2 desorption theoretically, which is conducive to the photocatalytic water splitting for hydrogen generation and other photovatalytic reactions. Our work suggests that Cs2AgBiBr6 is a potential candidate as a solar cell or a photocatalyst, and we provide theoretical explorations into reducing the layers of lead-free double perovskite materials to 2D atomic thickness for a better photocatalytic application, which can serve as guidelines for the design of excellent photocatalysts.