This study addresses the first-principles analysis using generalized gradient approximation (GGA), which is pillared on density functional theory (DFT), to find the effects of silver (Ag) doping on SrTiO3 structurally, electronically and optical properties. As Ag doping into SrTiO3, we see a small decrease in the volume of unit cell. Moreover, Ag-doping adds new states in SrTiO3 at Brillouin zone symmetry points, transferring host material’s indirect band gap to a direct band gap. Ag doping in SrTiO3 results in the transfer density of states to smaller energies and increase in interaction among Ag atom and its surrounding atoms. Moreover, at the conduction band, the partial density of states (PDOS) of SrTiO3 changes generally. As a result, we conclude that Ag doping has an effect on the electronic band structure of SrTiO3. SrTiO3 doping with Ag has improved optical properties and its ability of converting to direct band gap results it in a perfect choice for optoelectronic applications.