I don't know if such a topology is unique, but it exists if and only if $S$ is completely regular. This includes locally compact hausdorff spaces and CW complexes.
With Freyd's Adjoint Functor Theorem, it can be shown that the forgetful functor from abelian top. groups to top. spaces has a left adjoint. This is essentially the same proof as in the discrete case. Explicitely, $\mathbb{Z}[S]$, the free abelian top. group over the top. space $S$, is the usual free abelian group endowed with the weak topology for all homomorphisms $\mathbb{Z}[S] \to A$, such that $S \to \mathbb{Z}[S] \to A$ is continuous. Here, $A$ is an arbitrary abelian top. group. In order to show that this topology exists, we may assume that $A$ is, as a group, a quotient of $\mathbb{Z}[S]$, so that these $A$ form a set. But the description of the topology does not change and even without Freyd's Theorem it is easy to see that $\mathbb{Z}[S]$ thus becomes an abelian top. group satisfying the desired universal property.
Now I claim that the three assertions
$S \to \mathbb{Z}[S]$ is a homeomorphism onto its image.
$S$ is a subspace of an abelian top. group.
$S$ is completely regular.
are actually equivalent!
1) implies 2), that's clear. Now assume 2), thus $S \subseteq A$ for some top. abelian group. Extend the inclusion $S \to A$ to a continuous homomorphism $\mathbb{Z}[S] \to A$. Every open subset of $S$ can be extended to an open subset of $A$. Pull it back to $\mathbb{Z}[S]$. This is an open subset of $\mathbb{Z}[S]$ which restricts to the given oben subset of $S$. This proves 1).
2) implies 3), this follows from the fact that every topological group is completely regular and subspaces of completely regular spaces are obviously completely regular.
Finally assume 3), i.e. $S$ carries the initial topology with respect to all continuous functions $S \to \mathbb{R}$. Endow $\mathbb{R}^{(S)}$ with the initial topology with respect to all homomorphisms $\mathbb{R}^{(S)} \to \mathbb{R}$, such that the restriction $S \to \mathbb{R}$ is continuous. Then $\mathbb{R}^{(S)}$ is an abelian topological group and $S \to \mathbb{R}^{(S)}$ is an embedding, thus 2).
I also believe that (but cannot prove)
- If $S$ is hausdorff and completely regular, $\mathbb{Z}[S]$ is hausdorff.
In another comment, it was suggested to endow $\mathbb{Z}[S]$ with the final topology with respect to $S \to \mathbb{Z}[S]$. But this does not even yield a translation invariant topology: If $S=\{a,b\}$ with the only nontrivial open subset $\{a\}$, then $\{a\}$ is open in $\mathbb{Z}[S]$, but $\{b\}$ is not.
But maybe, if $S$ is a completely regular space, the topology of $\mathbb{Z}[S]$ used above is the final topology?