EDIT: Here is an easier proof than that using the closed graph theorem from below.
For $N \in \Bbb{N}$, define the bounded(!) functional $$\varphi_N : \ell^2 \to \Bbb{K}, (b_n)_n \mapsto \sum_{n=1}^N a_n b_n.$$
By your assumption, you have $\varphi_N ((b_n)_n) \to \varphi((b_n)_n) = \sum_n a_n b_n$ for all $(b_n)_n \in \ell^2$.
But (as a consequence of the uniform boundedness principle), a pointwise limit of bounded functionals on a Banach space is automatically bounded.
As below, it is easy to see that boundedness of $\varphi$ implies $(a_n)_n \in \ell^2$.
Additional EDIT: Boundedness of $\varphi$ implies $(a_n)_n \in \ell^2$ in at least two ways:
By Riesz representation theorem, there is $(a_n ')_n \in \ell^2$ with $\varphi((b_n)_n)=\sum a_n ' b_n$ for all $(b_n)_n \in \ell^2$. This easily yields $a_n = a_n '$ for all $n$.
For each $N$, let $a^N$ be the sequence $(a_n)_n$, but with all but the first $N$ terms set to zero. Then $\|a^N \|_2^2 = \varphi (a^N) \leq \|\varphi\| \|a^N\|_2$. Hence, $\|a^N\|_2 \leq \|\varphi\|$ for all $N$.
For the sake of completeness, I still include the original argument:
Your assumptions imply (why exactly) that the linear map
$$
\Phi :\ell^2 \to \ell^1, (b_n)_n \mapsto (a_n b_n)_n
$$
is well defined.
It is straightforward to check that $\Phi$ has closed graph. Thus, it is bounded by the closed graph theorem.
Thus, the map
$$
\ell^2 \to \Bbb{K}, (b_n)_n \mapsto\sum_n a_n b_n
$$is a bounded linear functional. From this, the claim easily follows.