In this paper, we study the structural, electronic and optical properties of the inorganic solar perovskites XPbBr3 (X= Li or Na). We applied the two methods: the density functional theory (DFT) and time-dependent density-functional theory (TDDFT). In fact, we performed the DFT method using the Quantum Espresso package. Also, the total energies of the studied inorganic solar perovskites XPbBr3 (X= Li or Na) have been deduced as a function of the lattice parameter a (Å). The two calculation methods have been carried out under the GGA-PBE and GGA-PBESol approximations. Moreover, the total and partial density of states (DOS) and the band structure of the studied compounds have been presented and discussed for the two cases: with and without the spin orbit coupling (SOC) approximation. In addition, the DFT and TDDFT have been explored in order to elaborate the structural, the electronic and the optical properties of the inorganic perovskite CsPbI3 material for solar cell applications. When using the GGA-PBESol method without SOC approximation, we found a band gap energy value greater than that one computed when adding the SOC correction. On the other hand, the optical properties of the studied material have been studied. In particular, we found that the inorganic solar Perovskite XPbBr3 (X=Li or Na) materials exhibit a high transparency of the electromagnetic radiations in energy range between 0 eV and 33 eV.