A metric space is separable iff every open set is a countable union of balls.
One direction is easy: if is a countable dense subset of and is an enumeration of the rationals, then the balls is a countable base ( is a second-countable space), and in particular every open set is a union of a family of such balls that is at most countable.
The other direction is trickier. (This is based on a MathOverflow discussion, which for the moment we record with little adaptation.) Suppose is not separable; construct by recursion a sequence of length such that no lies in the closure of the set of its predecessors (each such set is countable and therefore not dense, so such outside its closure can be found at each stage).
Therefore, for each we may choose a rational radius such that the ball contains no predecessor . There are uncountably many , so some rational radius was used uncountably many times. The collection of for which forms another -sequence which we now use instead of the first; since all the radii are the same, this sequence has the property that each contains no other , no matter whether appears before or after in the sequence.
Provided that there uncountably many such that are non-isolated in , we can easily construct an open set that is not a countable union of balls. For around each such we can find a small ball of radius at most , such that is inhabited by a point . Put . No ball interior to can contain another , since for that we would need and such would then include , which is excluded from by design. Thus, since there are uncountably many , we need uncountably many balls to cover .
We may therefore assume that there are at most countably many non-isolated . Discard these, so without loss of generality we may suppose all the are isolated points of and that for some fixed the ball contains no other . For each , let be the supremum over all such that is countable. It follows that is itself countable, as is . At each stage , there is a countable set disjoint from such that for each , there exists with . By transfinite induction, we can construct a cofinal subset of such that whenever . The set is open in , and we claim that it is not a countable union of balls. For suppose otherwise. Let be such a countable family of balls; then there is some minimal for which is uncountable, so that . By construction of , there exists . But since , we have that for some , and this contradicts our condition on .