From the Super Mario Wiki
Stormtroopas are Koopa Troopas and Super Troopas that wear costumes similar to those of Darth Vader's Imperial Stormtroopers. Stormtroopas only appeared in The Super Mario Bros. Super Show! episode "Star Koopa", where they followed the orders of Darth Koopa.
In "Star Koopa", Darth Koopa, having successfully captured the Flying Pizza onto his Koop Star with a tractor beam, ordered his Stormtroopas to seize Mario, Luigi, Princess Toadstool and Toad. Although the Stormtroopas attempted to fight against the four heroes with Lightplungers, they lost, and had to rely on Darth Koopa to succeed for them.
Stormtroopas appeared later on, this time piloting their own Starfighters, to fight off Mario and his friends, who were trying to breach Koop Star in Mushroom Starfighters. However, the Stormtroopas were unsuccessful in stopping the heroes, allowing Mario to blow up the foundation of Koop Star, destroying the entire spacecraft before its Birdo Ray could destroy the Mushroom Colonists' Planet.