Are there any theorems linking periodic functions to the number of times they are differentiable? I was working through some Fourier series questions and I was wondering if the periodicity of a function has anything to do with the number of times it's differentiable. For instance, the elementary trigonometric functions are periodic and differentiable infinitely many times. I couldn't find anybparticular theorems or information about this and I was just wondering if there is any possible link between these two concepts.

There's no way to tell whether a function is "piecewise"; that is only an artifact of the limitations of how we (as humans) are able to write down an expression for the value of the function.
Anyways, just periodicity alone affords you very little. Indeed, arbitrary Fourier series are periodic, and the famous 
Weierstrass function is periodic, continuous and differentiable nowhere.
However, if you know something about the decay of the Fourier coefficients of our periodic function, then in fact it does imply something about differentiability.

Theorem: Let $f \in L^2[-T,T]$ and suppose the $2T$-periodic Fourier series coefficients $a_n$ of $f$ satisfy
  $$
|a_n| \le C |n|^{-k-1-\epsilon}
$$
  for some $C, \epsilon > 0$. Then $f \in C^k$.

This generalizes the fact that sine and cosine are infinitely differentiable; their Fourier coefficients are all zero except the first few terms, so they have the maximum amount of coefficient decay.
