Free topologican groups, abelian or not, have been studied since the 40s by Markov and Graev (the original references are somewhat obscure). You need your space $S$ to be completely regular for the construction to work. There is a survey by O. V. Sipacheva (THE TOPOLOGY OF FREE TOPOLOGICAL GROUPS, Journal of Mathematical Sciences, Vol. 131, No. 4, 2005) which is maybe too thorough if you just want to get a feeling of this concept, but the first two or three pages contain interesting and easy-to-grasp information on this class of topological groups. The construction itself is not that difficult, and the topology is indeed unique, but they are sometimes difficult to delve into, especially the non-Abelian ones, and a very valuable source of counterexamples.
 I have read the question more carefully and it seems to amount to the following: For a (well behaved) topological space $S$, can one endow the free group $\mathbb Z[S]$ with a group topology such that $S$ becomes a topological subspace of this group? If so, is this construction unique? The answer to the first question is yes, as I have just said. Moreover, $S$ becomes a closed subspace of $\mathbb Z[S].$ I'm not sure about the uniqueness, though. The universal property which characterizes the free topological abelian group is, as long as I remember, the following: it is the only group topology on the free abelian group for which the inclusion mapping $S\to \mathbb Z[S]$ becomes a topological embedding and such that for every continuous mapping $f:S\to G,$ where $G$ is a topological Hausdorff abelian group, the unique homomorphism which extends $f$ to $\mathbb Z[S]$ becomes continuous. This is at first sight a stronger property than the one contained in your question.