Team Bonuses provide extra stats to a team if the team has troops that share certain qualities. There are bonuses for troops of the same kingdom, the same type, and the same color. These bonuses are given to the entire team, even to troops which don't share those qualities.
The Kingdom Team Bonus is given to teams that have two, three or four troops that share a kingdom, with larger bonuses being given for three or four troops. Each Kingdom has its own specific range of bonuses (although they are not all unique). It is entirely possible to have a team with two troops from one kingdom and the other two from a second kingdom, and get both of the kingdoms' minimum two-troop bonuses.
The Troop Type Bonus is given to teams that have three or four troops that share a type (but not for two). Once again, each type has its own specific (but not unique) set of bonuses. Because troops can have two types each, it is possible to have multiple troop type bonuses on one team.
The Color Bonus is solely given to teams that have all four troops sharing a color, i.e. four Yellow Troops (troops can be multicolored so long as they all share at least one color). The reward is +25 Gem Mastery of that color for that team.
Two kingdom bonuses and one type bonus:
One kingdom bonus and two type bonuses.