This seems to be completely answered in the topological category by Thm 1.4 of http://arxiv.org/pdf/1202.3368v3.pdf.
Edit
If X is a topological space which is not Dieudonne complete (meaning its topology cannot be given by a complete uniformity), then it seems theorem 7.24 of http://books.google.com/books?id=v3_PVdvJek4C&pg=PA35&lpg=PA35&dq=free+topological+group+dieudonne+complete&source=bl&ots=QIt0C2TCjN&sig=d4BJjO2h3zM4jDLoTzijrDVYt3w&hl=en&sa=X&ei=VIw8UeuBJpO30QHek4C4AQ&ved=0CC4Q6AEwAA and Thm 1.4 of the paper above shows that the free topological group on X is not the isometry group of a metric space. Googling shows completely regular spaces exist which are not Dieudonne.
I believe that any polish group or locally compact group is an isometry group of a metric space by the paper I linked.
Also the author of the first paper has shown that every Lie group is the isometry group of another Lie group with respect to some proper metric.