If you raid casually, and you're content with just joining 20-person lobbies and getting maybe 12 Premier Balls and 3 Rare Candies per raid, this list isn't really important for you. With 20 people, you could use 6 Level 1 Pidgeys and still win.
However, if you want to be strong enough to defeat Tier 5 Raids with just you and 2 other people, and getting 18 Premier Balls and up to 24 Rare Candies per raid interests you, then using the right Pokemon is important.
A Pokemon's strength is based on 2 major factors: base stats and moveset.
Mewtwo's Base Stats: 300 Attack, 182 Defense, and 214 HP.
Drowzee's Base Stats: 89 Attack, 136 Defense, and 155 HP.
Mewtwo's base stats are strictly higher than Drowzee's.
Against Rayquaza, a Level 40 Powder Snow/Avalanche Mamoswine does an average of 44.5 DPS, enough to easily defeat it with 2 people.
Against the same Rayquaza, a Level 40 Mud Slap/Bulldoze Mamoswine does an average of 5.8 DPS, which is lower than absolute powerhouses such as Tackle/Hyper Fang Rattata (coming in at 5.9 DPS).
Type usage recommendations will ignore Arceus and Silvally, as they can be any of the 18 types; it is currently unknown how they will be implemented in Pokemon Go.
Machamp has been the center of the Pokemon Go raid meta since the beginning. While Fighting-types are not commonly used against Tier 5 raids, Dark-types such as Tyranitar are; Fighting-types earn their spot on any raid roster by virtue of being the best counter to Dark-types.
Use Fighting-types against: Regice, Regirock, Registeel, Dialga, Heatran1, Regigigas, Darkrai, Cobalion, Terrakion, Kyurem, Meloetta-Pirouette, Type:Null, Guzzlord2, Kartana3, Stakataka
1 Ground-types are significantly more effective against Heatran.
2 Fairy-types will be significantly more effective against Guzzlord (Dragon/Dark).
3 Fire-types will be significantly more effective against Kartana (Grass/Steel).
Psychic is the most-represented type across all Legendary Pokemon. As such, Dark- and Ghost-type Pokemon are invaluable for beating down on these Tier 5 raids.
Use Dark and Ghost-types against: Mewtwo, Lugia, Latias1, Latios1, Deoxys, Uxie, Mesprit, Azelf, Giratina1, Cresselia, Meloetta-Aria2, Hoopa-Confined, Solgaleo, Lunala, Necrozma1, Tapu Lele3, Marshadow3, Blacephalon
1 Dragon-types are significantly stronger than Dark- and Ghost-types when they are both super-effective; Ultra Necrozma is Psychic/Dragon.
2 Only Dark (not Ghost) is super-effective against Meloetta-Aria (Normal/Psychic).
3 Only Ghost (not Dark) is super-effective against Tapu Lele (Psychic/Fairy) and Marshadow (Ghost/Fighting).
Dragon is the 2nd-most common type in Legendary Raids. The best counters to Dragons are typically Dragons, unless they are 4x weak to another type (most commonly Ice).
Use Dragons against: Latias, Latios, Rayquaza1, Palkia, Giratina, Reshiram, Zekrom, Kyurem2, Zygarde1, Ultra Necrozma, Guzzlord3, Naganadel
1 Ice-types are significantly more effective against Dragons that are 4x weak to Ice.
2 Kyurem (Dragon/Ice) will likely have lethal Ice-type attacks for most of our Dragons. Metagross and Rampardos may be better options.
3 Fairy-types will be significantly more effective against Guzzlord (Dragon/Dark).
Flying-type Legendaries have historically been common, with the original Legendary Raids being Articuno and Lugia. As many Legendaries from future generations are also part-Flying, Flying-type counters are a valuable part of any raid roster. These Pokemon can be divided into 3 types: Ice, Rock, and Electric.
Ice-types have a wide offensive coverage: in addition to Flying-types, Ice-types are super-effective against Dragon, Grass, and Ground. They are most effective when preying on 4x weaknesses (eg. Dragon/Flying-types such as Rayquaza).
Use Ice-types against: Zapdos, Lugia, Latias1, Latios1, Groudon2, Rayquaza, Giratina1, Shaymin-Sky, Tornadus, Thundurus, Landorus, Zekrom1, Yveltal, Zygarde, Tapu Bulu3, Ultra Necrozma1, Guzzlord4, Naganadel1
1 Due to their extremely high Attack stats, the Big 6 Dragons are generally stronger counters to Dragons that are only 2x weak to Ice.
2 Avoid using Ice-types against Fire Blast Groudon; additionally, avoid using Mamoswine against Solar Beam Groudon.
3 Poison-types will be significantly more effective against Tapu Bulu (Grass/Fairy).
4 Fairy-types will be significantly more effective against Guzzlord (Dragon/Dark).
Rock-types were highly-demanded at the start of the Legendary Raid meta. While their importance has declined since then, Rampardos is so far above its competition that it will continue to brute-force its way into the top counters for any Legendaries that are weak to Rock.
Use Rock-types against: Articuno, Moltres, Zapdos, Entei, Lugia, Ho-Oh, Regice, Rayquaza1, Shaymin-Sky1, Tornadus, Thundurus, Reshiram2, Kyurem2, Yveltal, Volcanion3, Blacephalon
1 Ice-types are significantly more effective against Rayquaza and Shaymin-Sky (Grass/Flying).
2 The Big 6 Dragons are generally stronger counters against Dragons that are only 2x weak to Rock; however, Rampardos' DPS is so high that it can easily compete as a top counter.
3 Volcanion (Water/Fire) will likely have lethal Water-type attacks for Rock-types.
Electric-types have a narrower offensive coverage than Ice or Rock, only being super-effective against Water in addition to Flying, but that doesn't make Electric-types useless. Kyogre is one of the hardest Raids in the game, and it's also among the strongest and most-desirable Legendary Pokemon. Electric-types are consistently the best counters to it - against Blizzard Kyogre, Electric-types are essentially required to pull off the trio.
Use Electric-types against: Articuno1, Moltres1, Suicune, Lugia, Ho-Oh1, Kyogre, Tornadus, Keldeo, Yveltal, Volcanion, Tapu Fini, Celesteela
1 Rock-types are significantly more effective against these Pokemon due to their 4x weakness.
Grass is a relatively poor offensive type; it is super-effective against Water, Ground, and Rock, which are not very common types among Legendary Raids. Fortunately for Grass-types, Groudon and Kyogre happen to be Ground- and Water-type Legendaries respectively, meaning they are both weak to Grass; this alone gives Grass-types a niche in the raid meta.
Use Grass-types against: Suicune, Regirock, Kyogre1, Groudon2, Terrakion, Keldeo, Diancie3, Tapu Fini
1 Avoid using Grass-types against Blizzard Kyogre.
2 Avoid using Grass-types against Fire Blast Groudon.
3 Steel-types will be significantly more effective against Diancie (Rock/Fairy).
Water is one of the strongest offensive types in the main series, with super-effective coverage against Fire, Rock, and Ground - 3 of the most common types in the game. Unfortunately for Water-types in Pokemon Go, there aren't a whole lot of Fire-, Rock-, or Ground-type Legendaries, and many of them are either 4x weak to another type or neutral to Water. However, Water-types are top-tier counters to Groudon, which is one of the most common and most desirable Raid Bosses; that alone gives them meta-relevance.
Use Water-types against: Moltres1, Entei, Ho-Oh1, Regirock, Groudon2, Heatran3, Terrakion, Landorus4, Diancie5, Nihilego3, Stakataka5, Blacephalon
1 Rock-types are significantly more effective against these Pokemon due to their 4x weakness.
2 Avoid using Water-types against Solar Beam Groudon.
3 Ground-types are significantly more effective against these Pokemon due to their 4x weakness.
4 Ice-types will be significantly more effective against Landorus (Ground/Flying).
5 Steel-types will be significantly more effective against Diancie (Rock/Fairy).
5 Fighting-types will be significantly more effective against Stakataka (Rock/Steel).
Steel as an offensive type has historically had no standout attackers powerful enough to really make a dent in the raid meta. Enter Meteor Mash Metagross. Meteor Mash is an insanely overpowered move that single-handedly catapults Metagross from mediocrity to being a top-tier attacker against Rock-, Ice-, and Fairy-types.
Use Metagross against: Articuno1, Regirock, Regice, Terrakion, Kyurem, Xerneas, Diancie, Tapu Lele, Tapu Bulu2, Nihilego3
1 Rock-types are significantly more effective due to the 4x weakness.
2 Poison-types will be significantly more effective against Tapu Bulu (Grass/Fairy).
3 Ground-types will be significantly more effective against Stakataka (Rock/Steel).
With the addition of Charm to Pokemon Go, Fairy-types finally have a Fairy-type Fast Move. Fairy is super effective against Fighting, Dark, and Dragon. Unfortunately, even with a Fairy-type Fast Move, Fairies still face stiff competition from other types: Machamp beats down Dark-types better, and Dragon- and Ice-types do the Dragon-slaying job better.
Use Fairy-types against: Latios1, Latias1, Rayquaza2, Palkia1, Giratina1, Terrakion, Virizion3, Keldeo, Zekrom1, Kyurem4, Meloetta-Pirouette, Yveltal, Zygarde2, Buzzwole3, Pheromosa3, Guzzlord, Ultra Necrozma1
1 The Big 6 Dragons will be significantly stronger against Pokemon that are 2x weak to both Dragon and Fairy.
2 Ice-types are significantly more effective against Pokemon that are 4x weak to Ice.
3 Flying-types will be significantly more effective against Pokemon that are 4x weak to Flying. 4 Metagross, Machamp, and Metagross will all outpeform Fairy-types against Kyurem (Dragon/Ice).
The Pokemon in this section aren't necessarily bad, per se; they just have a very narrow niche in the Pokemon Go raid meta.
Psychic-types generally have only one purpose in Pokemon Go: soloing Machamp Raids. Past that, they aren't really useful for anything else; Gen 5 has 4 Fighting-type Legendaries, but only 3 of them are weak to Psychic, and against those 3, Psychic-types face heavy competition from other types.
Use Psychic-types against: Terrakion, Virizion1, Keldeo, Meloetta-Pirouette, Marshadow, Nihilego2, Buzzwole 1, Pheromosa 1, Naganadel3
1 Flying-types will be significantly more effective against Virizion (Grass/Fighting), Buzzwole (Bug/Fighting), and Pheromosa (Bug/Fighting).
2 Ground-types will be significantly more effective against Nihilego (Rock/Poison).
3 Due to their extremely high Attack stats, the Big 6 Dragons will be better counters to Naganadel (Poison/Dragon).
Ground-types have great stats, but they are cursed with absolutely terrible moves. The only saving grace for Ground-types is that Electric-types are only weak to Ground, and that a few Legendaries are 4x weak to Ground. In all other scenarios, avoid using Ground-types if you have the choice of using a Pokemon of another type.
Use Ground-types against: Raikou, Entei1, Regirock1, Registeel1, Dialga1, Heatran, Cobalion1, Terrakion1, Zekrom1, Diancie2, Volcanion3, Tapu Koko1, Solgaleo1, Necrozma-Dusk1, Magearna1, Zeraora, Nihilego, Xurkitree, Stakataka4
1 Ideally, use another type that's super-effective instead of Ground.
2 Steel-types will be significantly more effective against Diancie (Rock/Fairy).
3 Volcanion's Water-type attacks will be lethal to most Ground-types except Garchomp. Also, use another super-effective type if possible.
4 Stakataka (Rock/Steel) is 4x weak to both Ground and Fighting; Fighting-types will be significantly stronger because of how weak Ground-type moves are.
Fire-types generally have good to great stats, and above-average moves. When a Raid Boss is weak to Fire, Fire-types are often near the top of the list of counters. The main problem that Fire-types face: there just aren't a whole lot of Legendary Raids that require Fire-type DPS.
Use Fire-types against: Articuno1, Regice, Registeel, Shaymin-Sky2, Cobalion, Virizion3, Genesect, Tapu Bulu4, Solgaleo, Necrozma-Dusk, Magearna, Buzzwole3, Pheromosa3, Celesteela, Kartana
1 Rock-types are significantly more effective due to the 4x weakness.
2 Ice-types will be significantly more effective against Shaymin-Sky (Grass/Flying).
3 Flying-types will be significantly more effective against Virizion (Grass/Fighting), Buzzwole (Bug/Fighting), and Pheromosa (Bug/Fighting).
4 Poison-types will be significantly more effective against Tapu Bulu (Grass/Fairy).
Flying-types in Pokemon Go are by far the best counters to exactly 3 Legendaries: Virizion (Grass/Fighting), Buzzwole (Bug/Fighting), and Pheromosa (Bug/Fighting). For these 3 Raid Bosses, exploiting their 4x Flying weakness will likely be necessary to duo them. Apart from these 3 very specific fights, however, Flying-types see almost no use. You could use them to solo Machamp, but Psychic-types will generally do that job better.
Use Flying-types against: Shaymin-Sky1, Virizion, Keldeo, Meloetta-Pirouette, Tapu Bulu2, Marshadow, Buzzwole, Pheromosa
1 Ice-types will be significantly more effective against Shaymin-Sky (Grass/Flying).
2 Poison-types will be significantly more effective against Tapu Bulu (Grass/Fairy).