A class of abelian topological groups was previously defined to be a variety of topological groups with coproducts if it is closed under forming subgroups, quotients, products and coproducts in the category of all abelian topological groups and continuous homomorphisms. This extended research on varieties of topological groups initiated by the second author. The key to describing varieties of topological groups generated by various classes was proving that all topological groups in the variety are a quotient of a subgroup of a product of groups in the generating class. This paper analyses generating varieties of topological groups with coproducts. It focuses on the interplay between forming products and coproducts. It is proved that the variety of topological groups with coproducts generated by all discrete groups contains topological groups which cannot be expressed as a quotient of a subgroup of a product of a coproduct of discrete groups. It is proved that the variety of topological groups with coproducts generated by any infinite-dimensional Hilbert space contains all infinite-dimensional Hilbert spaces, answering an open question. This contrasts with the result that a variety of topological groups generated by a topological group does not contain any infinite-dimensional Hilbert space of greater cardinality.