Since $A$ and $B$ commute, they can be diagonalized simultaneously, i.e. there is an invertible matrix $S$ such that
$$ A = S^{-1} \mathrm{diag}(\lambda_1, \dots, \lambda_n) S, \quad B = S^{-1} \mathrm{diag}(\mu_1, \dots, \mu_n) S.$$
where $\mathrm{diag}$ is a diagonal matrix with the specified diagonal entries (the eigenvalues of $A$ resp. $B$). Then
$$ AB = S^{-1} \mathrm{diag}(\lambda_1, \dots, \lambda_n) SS^{-1} \mathrm{diag}(\mu_1, \dots, \mu_n) S = S^{-1}\mathrm{diag}(\lambda_1, \dots, \lambda_n)\mathrm{diag}(\mu_1, \dots, \mu_n) S \\ = S^{-1}\mathrm{diag}(\lambda_1 \mu_1, \dots, \lambda_n \mu_n) S $$
and the eigenvalues are indeed, as you suspected, the product of the eigenvalues. Observe that the order in which the eigenvalues are multiplied depend on the matrix $S$, i.e. is not arbitrary.