We investigate electron and hole dynamics upon photon excitation in dye-sensitized solar cells, using a recently developed method based on real-time evolution of electronic states through time-dependent density functional theory. The systems we considered consist of organic sensitizers and nanocrystalline TiO2 semiconductors. We examine the influence of various factors on the dynamics of electrons and holes, including point defects (vacancies) on the TiO2 surface, variations in the dye molecular size and binding geometry. and thermal fluctuations which result in different alignments of the electronic energy levels. Two clear trends emerge: (a) dissociated adsorption of the dye molecules leads to faster electron injection dynamics by reducing interfacial dipole moments; (D) oxygen vacancy defects stabilize dye adsorption and facilitate charge injection, at the cost of lower open circuit voltage and higher electron hole recombination rate. Understanding of these effects at the atomic level suggests tunable parameters through which the electronic characteristics of dye-sensitized solar cell devices can be improved and their efficiency can be maximized.