If you know the method of finite differences, it can also be applied to this problem. Let $f(n)=\sum_{i=1}^n i^2$:
$$
\begin{array}{c|lcr}
n & 1 & 2 & 3 & 4 & 5 & 6 & 7 & ... \\
\hline
f(n) & 1 & 5 & 14 & 30 & 55 & 91 & 140 & ... \\
\nabla n & & 4 & 9 & 16 & 25 & 36 & 49 & ... \\
\nabla^2n & & & 5 & 7 & 9 & 11 & 13 & ... \\
\nabla^3 n & & & & 2 & 2 & 2 & 2 & ... \\
\end{array}
$$
Once we see that there are constant differences, we know that a polynomial of the order of those constant differences will satisfy our sequence of numbers. In this case, the constant $2$'s correspond to the third level of differences, and therefore a polynomial of the form $g(n)=an^3+bn^2+cn+d$ will be the solution.
Using $g(1)$, $g(2)$, $g(3)$, and $g(4)$, the system of equations
$$
\left\{
\begin{array}{c}
a+b+c+d=1 \\
8a+4b+2c+d=5 \\
27a+9b+3c+d=14 \\
64a+16b+4c+d=30
\end{array}
\right.
$$
results (the same system that has shown up in previous answers), and your favorite method to solve for $a,b,c$ and $d$ can be applied. In the end, the formula that results is $$g(n)=\frac{n^3}{3}+\frac{n^2}{2}+\frac{n}{6}$$