As Igor Rivin said, the question was answered herehere for $k\geq 5$ by Greg Martin. For $n$ not divisible by $8$, the asymptotic formula described there remains valid for $k=3$ and $k=4$ as well, but the proof techniques are slightly different. Note that for $k=3$ the singular series can vanish, but only if $r_3(n)=0$. For $n$ divisible by $8$, we have $r_3(n)=r_3(n/4)$ and $r_4(n)=r_4(n/4)$, so one can reduce to the previous case. Finally, for $k=2$ there is an explicit formula based on arithmetic in Gaussian integers.
Bounding the singular series and the error term is a subtler task.