My initial answer was incorrect, but I believe it is interesting to explain how and why it is incorrect and provide some comments elaborating upon the correct answers posted here (I have left my initial incorrect answer unedited below).
The Jordan normal form classifies all matrices up to similarity transformations. It shows that matrices have a two step decomposition. The first step consists of the eigenvalues themselves, and the second step consists of the Jordan blocks corresponding to a given eigenvalue.
For the question under consideration here (how much information is revealed by knowing the algebraic and geometric multiplicities), distinct eigenvalues may be treated separately from one another and thus the first step in the decomposition is not essential to the question. Thus, one may focus on a single eigenvalue, and furthermore shift the eigenvalue to $0$. This leads to considering nilpotent matrices. A matrix is nilpotent if its characteristic polynomial is $x^n$, which in particular implies that it is an $n\times n$ matrix.
Any such matrix has eigenvalue $0$ with algebraic multiplicity $n$. Moreover, the eigenspace of $0$ coincides with the kernel of the matrix, from which one can see that the eigenspace is equal to the direct sum of the kernels of the Jordan blocks. In particular, the geometric multiplicity (=dimension of eigenspace) is equal to the number of Jordan blocks, since each has a kernel of dimension $1$.
Thus we see there are two cases where knowing the algebraic and geometric multiplicity is sufficient to reconstruct the matrix up to similarity: either when the algebraic and geometric multiplicities coincide (equivalent to diagonalizability), or when the geometric multiplicity is $1$.
Yes, the knowledge of all the algebraic and geometric multiplicities of all eigenvalues of a matrix is sufficient to determine the matrix up to similarity transformations. This follows (and is equivalent to the existence of) the Jordan normal form.