On the basis of time-dependent density functional theory (TD-DFT) we performed first-principle calculations to predict optical properties and transition states of pristine, N- and S-doped, and N+S-codoped anatase TiO2 nanotubes of 1 nm-diameter. The host O atoms of the pristine TiO2 nanotube were substituted by N and S atoms to evaluate the influence of dopants on the photocatalytic properties of hollow titania nanostructures. The charge transition mechanism promoted by dopants positioned in the nanotube wall clearly demonstrates the constructive and destructive contributions to photoabsorption by means of calculated transition contribution maps. Based on the results of our calculations, we predict an increased visible-light-driven photoresponse in N- and S-doped and the N+S-codoped TiO2 nanotubes, enhancing the efficiency of hydrogen production in water-splitting applications.