Tin dioxide (SnO2), due to its non-toxicity, high stability and electron transport capability represents one of the most utilized metal oxides for many optoelectronic devices such as photocatalytic devices, photovoltaics (PVs) and light-emitting diodes (LEDs). Nevertheless, its wide bandgap reduces its charge carrier mobility and its photocatalytic activity. Doping with various elements is an efficient and low-cost way to decrease SnO2 band gap and maximize the potential for photocatalytic applications. Here, we apply density functional theory (DFT) calculations to examine the effect of p-type doping of SnO2 with boron (B) and indium (In) on its electronic and optical properties. DFT calculations predict the creation of available energy states near the conduction band, when the dopant (B or In) is in interstitial position. In the case of substitutional doping, a significant decrease of the band gap is calculated. We also investigate the effect of doping on the surface sites of SnO2. We find that B incorporation in the (110) does not alter the gap while In causes a considerable decrease. The present work highlights the significance of B and In doping in SnO2 both for solar cells and photocatalytic applications.