Tin dioxide (SnO2), due to its non-toxicity, high stability and electron transport capability represents one of the most utilized transition metal oxides in many optoelectronic devices such as photocatalytic devices, photovoltaics (PVs) and light-emitting diodes (LEDs). However, 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 photocatalytic applications' potential. Here, we apply density functional theory calculations to examine the effect of p-type doping with B and In of SnO2 on its electronic and optical properties. Calculation predict the creation of shallow energy states in the band gap, near the valence 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 notable decrease. The present work highlights the significance of boron and indium doping in SnO2 both for solar cells and photocatalytic applications.