For what $n$ is $\sum_{i=1}^\infty \frac{\cos (it)}{i^n}$ bounded and why doesn't a sine behave the same way?
The function we should look at is called the Polylogarithm function $$ \newcommand{\Li}{\operatorname{Li}} \newcommand{\Re}{\operatorname{Re}} \newcommand{\Im}{\operatorname{Im}} \newcommand{\sign}{\operatorname{sign}} \sum_{k=1}^\infty\frac{x^k}{k^n}=\Li_n(x)\tag{1} $$ Then, your functions are $$ \sum_{k=1}^\infty\frac{\cos(kt)}{k^n}=\Re\left(\Li_n\left(e^{it}\right)\right)\tag{2} $$ and $$ \sum_{k=1}^\infty\frac{\sin(kt)}{k^n}=\Im\left(\Li_n\left(e^{it}\right)\right)\tag{3} $$
For $n=1$, we have $$ \begin{align} \sum_{k=1}^\infty\frac{e^{ikt}}k &=-\log\left(1-e^{it}\right)\\ &=-\log(2-2\cos(t))+i\sign(t)\left(\frac\pi2-\frac{|t|}2\right)\tag{4} \end{align} $$ The real part of $(4)$ says $$ \lim_{t\to0}\sum_{k=1}^\infty\frac{\cos(kt)}k=\infty\tag{5} $$ and the imaginary part of $(4)$ says $$ \lim_{t\to0}\left|\sum_{k=1}^\infty\frac{\sin(kt)}k\right|=\frac\pi2\tag{6} $$
For $n=2$, we have $$ \sum_{k=1}^\infty\frac1{k^2}=\frac{\pi^2}6\tag{7} $$ Therefore, by Dominated Convergence (which is valid for infinite sums using a discrete measure), $$ \begin{align} \lim_{t\to0}\sum_{k=1}^\infty\frac{e^{ikt}}{k^2} &=\frac{\pi^2}6\tag{8} \end{align} $$ The real part of $(8)$ is $$ \lim_{t\to0}\sum_{k=1}^\infty\frac{\cos(kt)}{k^2}=\frac{\pi^2}6\tag{9} $$ and the imaginary part of $(8)$ is $$ \lim_{t\to0}\sum_{k=1}^\infty\frac{\sin(kt)}{k^2}=0\tag{10} $$
The case for any real $n\gt1$ is similar to $n=2$ since for $n\gt1$, $$ \sum_{k=1}^\infty\frac1{k^n}=\zeta(n)\lt\infty\tag{11} $$