What functions can be represented as a series of eigenfunctions

Your question situates within the realm of Sturm-Liouville theory and my subsequent answer applies to all differential operators (with associated eigenfunctions) that belong to this realm. You asked which continuous functions can be expanded in a series of eigenfunctions? The most natural answer turns out to be "functions that are square-integrable on the interval $(0,2\pi)$". Also non-continuous, square-integrable functions $f$ can be expanded in this way (under the proviso that $f$ is allowed to differ from its series-expansion $\sum_{1}^{\infty} \frac{\langle \mu_n,f\rangle}{\langle \mu_n,\mu_n\rangle} \mu_n(x)$ on a subset of $(0,2\pi)$ of measure zero)


Consider the following problem on the interval $[a,b]$ for some $a < b$ and real angles $\alpha,\beta$: $$ y''=\lambda y,\;\;\; a \le x \le b, \\ \cos\alpha y(a)+\sin\alpha y'(a) = 0 \\ \cos\beta y(b)+\sin\beta y'(b) = 0 $$ This gives rise to a discrete set of eigenvalues $$ \lambda_1 < \lambda_2 < \lambda_3 < \cdots, $$

and associated eigenfunctions $\phi_n(x)$. For any function $f\in L^2[a,b]$, the Fourier series for $f$ in these eigenfunctions converges to $f$ in $L^2[a,b]$. And you get pointwise convergence of the series at $x\in(a,b)$ under the same type of Fourier conditions that you learned for the ordinary Fourier series. The endpoint conditions make the convergence at $x=a,b$ trickier, of course. Conditions of the type $y(a)=0=y(b)$, for example, forces any series in these eigenfunctions to converge to $0$ at the endpoints.