If a signal is given on an interval $[0, 2\pi]$, the Fourier series can be written as $$ f(t) = c_0 + \sum_{n = 1}^\infty a_n\cos nt + b_n\sin nt $$ with coefficients $$ c_0 = \frac1{2\pi}\int_0^{2\pi}f(t)\,dt\\ a_n = \frac1{\pi}\int_0^{2\pi}f(t)\cos nt\,dt\\ b_n = \frac1{\pi}\int_0^{2\pi}f(t)\sin nt\,dt $$
Specifically, for the coefficients, where does the $1/\pi$ and $1/2\pi$ come from?
They come from the periodicity of $2\pi$ (The length of the interval $[0,2\pi]$ is $2\pi-0 = 2\pi$). If the period is something else, say $T$, then the values would change.
Note that when $T = 2\pi$, then $\frac{1}{\pi} = \frac{2}{T}$ and $\frac{1}{2\pi} = \frac1T$. Similarly, the integration would be $\int_0^{2\pi} f(t) dt = \int_0^T f(t) dt.$