From Wikipedia:
An important property of the moment-generating function is that if two distributions have the same moment-generating function, then they are identical at almost all points. That is, if for all values of t,
$M_X(t) = M_Y(t),$
then
$F_X(x) = F_Y(x)$
for all values of x (or equivalently X and Y have the same distribution).
This statement is not equivalent to "if two distributions have the same moments, then they are identical at all points", because in some cases the moments exist and yet the moment-generating function does not, because in some cases the limit
$\displaystyle \lim_{n \rightarrow \infty} \sum_{i=0}^n \frac{t^im_i}{i!}$
does not exist. This happens for the lognormal distribution.
If the moment generating function is defined on such an interval, then it uniquely determines a probability distribution.