We report very large bandgap enhancement in SrTiO3 (STO) films (fabricated by pulsed laser deposition below 800 {deg}C), which can be up to 20% greater than the bulk value, depending on the deposition temperature. The origin is comprehensively investigated and finally attributed to Sr/Ti antisite point defects, supported by density functional theory calculations. More importantly, the bandgap enhancement can be utilized to tailor the electronic and magnetic phases of the two-dimensional electron gas (2DEG) in STO-based interface systems. For example, the oxygen-vacancy-induced 2DEG (2DEG-V) at the interface between amorphous LaAlO3 and STO films is more localized and the ferromagnetic order in the STO-film-based 2DEG-V can be clearly seen from low-temperature magnetotransport measurements. This opens an attractive path to tailor electronic, magnetic and optical properties of STO-based oxide interface systems under intensive focus in the oxide electronics community. Meanwhile, our study provides key insight into the origin of the fundamental issue that STO films are difficult to be doped into the fully metallic state by oxygen vacancies.