Next-generation solar cells, such as dye-sensitized solar cells (DSSCs) and perovskite solar cells (PSCs), are fabricated in a configuration where light absorbers are located between the electron transporting layer (ETL) and the hole transporting layer (HTM). Although the most efficient DSSCs and PSCs have been fabricated using TiO2 as the ETL, TiO2 exhibits inherently low electron mobility with difficulty controlling the energy levels (i.e., conduction and valence bands) as it possesses a single phase of two components. Here, we report the synthesis of Sr-substituted BaSnO3 (BSSO) by a low-temperature solution process as a new alternative to TiO2 for both PSCs and DSSCs. The energy-level tailoring by Sr incorporation into BaSnO3 minimizes the open-circuit voltage (V-OC) loss at the interfaces of ETL/perovskite and ETL/electrolyte in the PSCs and DSSCs, thereby leading to an improved V-OC from 0.65 to 0.72 V in DSSC and 1.07 to 1.13 V in PSCs. Additionally, the BSSO ETL-based PSC shows improved photostability compared to the TiO2 analog. Our results show that energy-level tuned BSSO can be applied as a universal ETL for improving efficiency in both PSCs and DSSCs.