We summarized our recent studies on the optical properties of SrTiO3 single crystals and LaAlO3/SrTiO3 (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 SrTi1-xNbxO3 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 1-xNbxO3 single crystal and at the LAO/STO heterointerface. In SrTiO3 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 LaAlO3/SrTiO3 heterointerface compared to bulk crystals. We discuss the interface effects on the electron relaxation dynamics in terms of the strong interface potential.