I'm assuming that you are restricting your considerations to Hermitian matrices over $\mathbb{C}^n$ or symmetric matrices over $\mathbb{R}^n$. If the matrices are not Hermitian/symmetric then the statement is not true.
This equivalence between eigenvalues and positive definiteness follows immediately from the spectral theorem. For any Hermitian/symmetric matrix $A$ we can find an orthonormal basis $\{e_i\}$ consisting of its eigenvectors such that in this basis $A$ is diagonal, we can write
$$
A = \sum_i \lambda_i e_i e_i^*
$$
where $\lambda_i$ is the eigenvalue for the eigenvector $e_i$. Now if we have $\lambda_i \geq 0$ for all $i$ it is straightforward to see that for any vector $x = \sum_i x_i e_i$ we have
$$
x^* A x = \sum_i |x_i|^2 \lambda_i \geq 0.
$$
Conversely, if $x^* A x \geq 0$ then we have $e_i^* A e_i \geq 0$ which implies $\lambda_i \geq 0$.
You can extend this argument to negative definite matrices and also to construct examples of indefiniteness when A has a mixture of positive and negative eigenvalues.