Recall that for a random variable [tex]X[/tex] following a Bernoulli distribution [tex]\mathrm{Ber}(p)[/tex], we have the moment-generating function (MGF)
[tex]M_X(t)=(1-p+pe^t)[/tex]
and also recall that the MGF of a sum of i.i.d. random variables is the product of the MGFs of each distribution:
[tex]M_{X_1+\cdots+X_n}(t)=M_{X_1}(t)\times\cdots\times M_{X_n}(t)[/tex]
So for a sum of Bernoulli-distributed i.i.d. random variables [tex]X_i[/tex], we have
[tex]M_{\sum\limits_{i=1}^nX_i}(t)=\displaystyle\prod_{i=1}^n(1-p+pe^t)=(1-p+pe^t)^n[/tex]
which is the MGF of the binomial distribution [tex]\mathcal B(n,p)[/tex]. (Indeed, the Bernoulli distribution is identical to the binomial distribution when [tex]n=1[/tex].)