Oxygen vacancies at the SnO2(110) and (101) surface and subsurface sites have been studied in the framework of density functional theory by using both all-electron Gaussian and pseudopotential plane-wave methods. The all-electron calculations have been performed using the B3LYP exchange-correlation functional with accurate estimations of energy gaps and density of states. We show that bulk oxygen vacancies are responsible for the appearance of a fully occupied flat energy level lying at about 1 eV above the top valence band, and an empty level resonant with the conduction band. Surface oxygen vacancies strongly modify the surface band structures with the appearance of intragap states covering most of the forbidden energy window, or only a small part of it, depending on the vacancy depth from the surface. Oxygen vacancies can account for electron affinity variations with respect to the stoichiometric surfaces as well. A significant support to the present results is found by comparing them to the available experimental data.