يد الله مع الجماعة من شذ شذ في النار ( رواه الترمذي
"The hand of Allah is with (Muslims' group/Muslims' community). And whoever splits away does so into the Fire." (narrated by Attermethyy)
"The hand of Allah ..." is a kind of metaphor in Arabic which means Allah's aid ,assistance and support
In other words, Allah is with the group and his help and mercy falls on them. Allah loves those who gather and act in group for His Sake.