The following Trainers are guaranteed to use at least one Legendary Pokemon.
PKMN Trainer N (Zekrom in Black 2, Reshiram in White 2)
Black Tower
Boss Trainer Harmony (Tornadus)
Boss Trainer Ira (Articuno, Entei)
Boss Trainer Benga (Latios)
Boss Trainer Janna (Suicune, Heatran, Latios)
White Treehollow
Boss Trainer Harmon (Thundurus)
Boss Trainer Iria (Moltres, Raikou)
Boss Trainer Benga (Latias)
Boss Trainer Jariel (Zapdos, Cresselia, Latias)
The following Trainers are pulled from a pool of all possible Trainers in the Battle Subway and Battle Institute. They can only appear as opponents in the Battle Subway's Super Course or in the Battle Institute's later battles.
These Trainers are guaranteed to use at least one Legendary Pokemon from their pools:
Socialite Aparna, Socialite Saty, Gentleman Camus, Gentleman Kavan
Articuno, Zapdos, Moltres, Raikou, Entei, Suicune, Regirock, Regice, Registeel, Latias, Latios, Heatran, Cresselia, Regigigas, Cobalion, Terrakion, Virizion, Tornadus, Thundurus, Landorus
These Trainers are not guaranteed to use a Legendary Pokemon:
Pilot Artemas, Pilot Chand
Articuno, Zapdos, Moltres, Tornadus, Thundurus
N (Bulbapedia)
Black Tower (Bulbapedia)
White Treehollow (Bulbapedia)
List of Battle Subway Trainers (Bulbapedia)
List of Battle Subway Pokemon (Bulbapedia)