Proof

\begin{align*} M(t) & = \sum_{x=0}^n e^{tx} \binom{n}{x} p^x (1-p)^{n-x} \\ & = \sum_{x=0}^n \binom{n}{x} (pe^t)^x (1-p)^{n-x} \\ & = \left ( p e^t + (1-p) \right )^n \end{align*}
where we used the binomial theorem to simplify the sum.
in-context