Two reasons: if $X$ is a metric space (as a Banach space is) and $X$ is separable (i.e. has a countable dense subset), then every subset of $X$ also has a countable dense subset. This holds because having a countable dense subset and having a countable base (for the topology) are equivalent in metric spaces. So $X$ separable implies $B_X$ separable by being metric alone.
But because of the Banach space structure, the reverse also holds: if $B_X$ has a countable dense subset $\{x_n: n \in \mathbb{N}\}$, then the set $\{m\cdot x_n: m,n \in \mathbb{N} \}$ is dense in $X$:
Let $x \in X$, $r>0$. Pick $m \in \mathbb{N}$ with $m > ||x||$. Then $\frac{1}{m} \cdot x \in B_X$, so we pick $x_n$ within distance $\frac{r}{m}$ of this point, by denseness. Then $||m \cdot x_n - x || = m||x_n - \frac{1}{m} \cdot x|| < m \frac{r}{m} = r$ as required.
And so $X$ also has a countable dense subset. And because all balls are homeomorphic, the unit ball isn't even special in that regard (if one open ball is separable, they all are).
(Note trivially that in a discrete metric space any unit ball is trivial, so separable, but only countable discrete metric spaces are separable, so in general we cannot go from separability of a ball to that of the whole space.)