Kirchhoff's loop rule
Going round any closed loop the potential changes add to zero, because potential is energy per charge and a charge back where it started has the same energy; so the emf gained in a battery equals the drops across the resistors.
From AP Physics 2.