It seems that a large class of periodic functions (e.g. continuously differentiable functions) can be represented as a trigonometric series, at least almost everywhere. But is there any function (less pathological the better) that CANNOT be represented as a trigonometric series almost everywhere? I know there are functions whose Fourier series does not converge, but that does not imply that it cannot be represented by a trigonometric series, does it? Many results in Fourier analysis assume at least integrability of functions, so if the function is not integrable, there seem to be little I can say about its trigonometric representation.
It depends what you mean by "can be represented."
It is perhaps natural to take it to mean that for all $\epsilon>0$ there is an $n(\epsilon)$ such that the series truncated at $m$ terms for any $m\geq n(\epsilon)$ has the property of always being within $\epsilon$ of the function being represented. If that is the meaning, then I'm pretty sure that continuous differentiation is necessary and sufficient.
Note that "always" here means at every point, using an $n(\epsilon)$ that does not depend on the selected point.