We summarized our recent studies on the optical properties of SrTiO<sub>3</sub> single crystals and LaAlO<sub>3</sub>/SrTiO<sub>3</sub> (LAO/STO) heterostructures using time-resolved photoluminescence (PL) and transient absorption (TA) measurements at low temperatures. We observed sharp band-edge PL peaks both in electron-doped SrTi<sub>1-x</sub>Nb<sub>x</sub>O<sub>3</sub> and LAO/STO samples, corresponding to the radiative recombination of doped electrons in the conduction band and photoexcited holes in the valence band. These results evidence the existence of free electrons in the SrTi <sub>1-x</sub>Nb<sub>x</sub>O<sub>3</sub> single crystal and at the LAO/STO heterointerface. In SrTiO<sub>3</sub> single crystals, TA signal gradually appears within 40 ps, which corresponds to the energy relaxation of photoexcited free electrons into self-trapped polaron states. The polaron formation time is enhanced considerably at the LaAlO<sub>3</sub>/SrTiO<sub>3</sub> heterointerface compared to bulk crystals. We discuss the interface effects on the electron relaxation dynamics in terms of the strong interface potential.