  Titanium dioxide is one of the most widely investigated oxides. This is due
to its broad range of applications, from catalysis to photocatalysis to
photovoltaics. Despite this large interest, many of its bulk properties have
been sparsely investigated using either experimental techniques or ab initio
theory. Further, some of TiO2's most important properties, such as its
electronic band gap, the localized character of excitons, and the localized
nature of states induced by oxygen vacancies, are still under debate. We
present a unified description of the properties of rutile and anatase phases,
obtained from ab initio state of the art methods, ranging from density
functional theory (DFT) to many body perturbation theory (MBPT) derived
techniques. In so doing, we show how advanced computational techniques can be
used to quantitatively describe the structural, electronic, and optical
properties of TiO2 nanostructures, an area of fundamental importance in applied
research. Indeed, we address one of the main challenges to TiO2-photocatalysis,
namely band gap narrowing, by showing how to combine nanostructural changes
with doping. With this aim we compare TiO2's electronic properties for 0D
clusters, 1D nanorods, 2D layers, and 3D bulks using different approximations
within DFT and MBPT calculations. While quantum confinement effects lead to a
widening of the energy gap, it has been shown that substitutional doping with
boron or nitrogen gives rise to (meta-)stable structures and the introduction
of dopant and mid-gap states which effectively reduce the band gap. Finally, we
report how ab initio methods can be applied to understand the important role of
TiO2 as electron-acceptor in dye-sensitized solar cells. This task is made more
difficult by the hybrid organic-oxide structure of the involved systems.
