I think the top voted answer is very helpful:
Since the theory is about eigenvalues of linear operators, and Heisenberg and other physicists related the spectral lines seen with prisms
It might be worth explaining a bit more precisely how the theory is related to optics, especially for people not familiar with how a prism works (like me)

As shown in the figure, a prism automatically decomposes a light into a series of monochromatic lights and refracts each of them by a different angle.(cf Cauchy's transmission equation)
We could consider the following analogies with the Spectrum Theorem:
the Matrix Operator $A$ as a prism
the input vector $v$ as a polychromatic light
each eigenvector of $A$ as monochromatic light, and the associated eigenvalue as the refractive index of the monochromatic light.
With spectral theorem, we know that we can decompose symmetric matrices(I stay in $\mathbb{R}$ for simplicity) into $A = V^{-1}\Lambda V = \sum{\lambda_i \vec{v_i} \cdot \vec{v_i}^t }$.
And $A \vec{x}=\sum{\lambda_i \vec{v_i} \cdot \vec{v_i}^t } \vec{x}= \sum{\lambda_i \vec{v_i} x_i }$
This is very similar to what a prism does with light: decompose, refract, and output. So, the spectrum theorem tells us we could find a spectrum of eigenvectors of a given symmetric matrix S.
References:
Spectrum of a matrix