This is the statement of Wigner's theorem. You can find (apparently two) proofs of Wigner's theorem here.
The broad summary is as follows. First, (pure) states are not elements of the Hilbert space $\mathcal H$. The set of physical states $\Sigma$ can be defined as the equivalence classes of $\mathcal H$ under the equivalence relation $\sim$, where $\psi \sim \phi \iff$ there exists some nonzero $\lambda \in \mathbb C$ such that $\phi=\lambda \psi$.
Let $\Phi,\Psi$ be elements of $\Sigma$. We define the ray product $(\Phi,\Psi)$ by choosing any two representatives $\phi$ and $\psi$ of $\Phi$ and $\Psi$, and defining
$$(\Phi,\Psi) := \frac{|\langle \phi,\psi\rangle|}{\Vert \phi\Vert \Vert \psi \Vert}$$
Having made this definition, it turns out that the mathematical predictions of the theory - decay rates, the probabilities of various measurement outcomes, etc - can be expressed in terms of ray products of physical states. Therefore, a symmetry transformation $T:\Sigma\rightarrow\Sigma$ is a bijective transformation on the space of physical states which leaves all ray products invariant, i.e. $(T\Phi,T\Psi)=(\Phi,\Psi)$.
Given some operator $\hat A$ on the Hilbert space, we can induce a corresponding transformation $\underline A$ on $\Sigma$ in the natural way. Furthermore, if $\hat U$ is a unitary or antiunitary operator on $\mathcal H$, one can see right away that $\underline U$ is a symmetry transformation on $\Sigma$, because
$$(\underline U\Phi,\underline U\Psi) := \frac{|\langle \hat U\phi,\hat U\psi\rangle|}{\Vert \hat U\phi\Vert \Vert \hat U\psi\Vert} = \frac{|\langle \phi,\psi\rangle|}{\Vert \phi\Vert \Vert \psi \Vert} = (\Phi,\Psi)$$
Note also that this association between operators on $\mathcal H$ and maps on $\Sigma$ is not one-to-one. Multiple different operators may induce precisely the same map. For example, the identity operator on $\mathcal H$ and the operator $\psi \mapsto e^{i\theta} \psi$ both induce the identity transformation on $\Sigma$ because they map all of the equivalence classes to themselves.
With these preliminaries out of the way, Wigner's theorem is a pseudo-converse of the above. It turns out that any symmetry transformation on $\Sigma$ can be induced by some unitary or antiunitary operator on $\mathcal H$. That doesn't mean that only (anti)unitary operators induce symmetry transformations, but rather that if some operator $\hat A$ induces a symmetry transformation, then we can find a unitary or antiunitary operator $\hat U$ which induces the same transformation. As a result, it is sufficient to restrict your attention to (anti)unitary operators.
Incidentally, this is also why we are interested in projective representations of groups, c.f. my related answer here.