What functions does the Fourier Series work for? Let us say we have a function $f[a,b]\rightarrow \mathbb{C}$ and we want to find the Fourier series for this function in the interval $[a,b]$ what is the condition on $f$ such that the Fourier series will converge to the function in this range?

My thoughts

I am guessing that the only requirement be that $f\in L^2(a,b)$ but I don't know if this is correct or if it is the reasoning behind it.
It's a very deep, celebrated theorem by Carleson (1966) saying that the Fourier series of an $L^2$ function converges pointwise almost everywhere.

On the other hand there are examples (already by Kolmogorov in 1876) of $L^1$ functions whose Fourier series diverge everywhere.

More elementary results are, for example that the Fourier series of a continuous, piecewise differentiable function converges pointwise everywhere. See this for a thorough discussion about convergence of Fourier series.
Fourier Series won't converge point-wise but on average.

From the start Fourier transform is (usually) defined on the Schwarz class of infinitely differentiable functions of compact support (which is a bit of a requirement), but it can be shown that functions in $L^2$ can be approximated arbitrarily well by functions which are Fourier transformable. I have seen one of the proofs of this in a course so it should probably be readily available online. The version I saw used the derivatives of $e^{-x^2}$ to build a basis and then showed that it was complete in $L^2$ and also Fourier transformable. Here seems to be some details on that. In this linked version they are not only derivatives but also renormalized to have integral 1 "probabilists" (probability distribution sums to 1). Probably out of convenience to make it an ON basis.