We study the variety generated by cartesian and direct wreath products of arbitrary sets X and Y of abelian groups. In particular, we give a classification of the cases when that variety is equal to the product variety var(X) var(Y). This criterion is a wide generalization of the theorems of Higman and Houghton about the varieties generated by wreath products of cycles, of a few other known examples about the varieties generated by wreath products of abelian groups (and of sets of abelian groups), and also of our recent research about the varieties generated by wreath products of abelian groups.