From the Super Mario Wiki
The magic wands (also known as Magic Scepters) are magic items that are often seen in the hands of the Koopalings. In Super Mario Bros. 3, magic wands were stolen from the Mushroom Worlds' Mushroom Kings, and were used to transform them into various helpless creatures (which varies between the NES version and the SNES/GBA remakes. The Koopalings also used the wands to shoot harmful projectiles when encountered as bosses. Mario and/or Luigi had to retrieve them in the airship to restore the king and proceed to the next world.
Magic wands, along with the Koopalings, appeared again in New Super Mario Bros. Wii. Their most recent appearances have been in New Super Mario Bros. 2, New Super Mario Bros. U, and New Super Luigi U.
The seven magic wands look like large golden rods with round, dome-shaped gems at the end of them in different colors. The wands' gems are vividly colored, and that is where the spell blasts are released from.
The magic wands were capable of transforming people into animals/plants, although it is implied that they can also be used to restore them to their original form. In addition, the wands can also fire three-ring shots/spellballs, or in some cases, summon Candy Rings (Wendy O. Koopa), spiked balls (Morton Koopa Jr., New Super Mario Bros 2 only), or circus balls (Lemmy Koopa).
Seven magic wands first debuted in the game Super Mario Bros. 3, where one of the seven Koopalings stole one each from the seven kings and use them to turn the kings into animals (or in the case of the Pipe Maze king, a plant). In the e-Reader levels for Super Mario Advance 4: Super Mario Bros. 3, despite the wands being returned to their rightful owners, Larry, Morton, and Ludwig were shown to wield them in battle again.
In the The Super Mario Bros. Super Show!, King Koopa occasionally held a similar magical weapon he called the Koopa scepter. Magic wands also had prominent roles in The Adventures of Super Mario Bros. 3, being used to make and solve tomfoolery.
Morton uses his wand to turn the Mushroom King into a rabbit in the book Leaping Lizards. However in that book the wand's magic only worked one-way, so when Luigi tried to use the wand to reverse the spell, instead of turning the king back to normal it turned him into a giant rabbit. In the subsequent book Koopa Capers, Wendy steals her brothers' wands in order to combine them with her own using a potion she learned about in Bowser's copy of Reptile Magic and VCR Programming Instructions.
Magic wands were not seen again for some time, although Bowser himself used a special rod known as the Vibe Scepter in Super Princess Peach (which was incidentally intended to feature the Koopalings). This magical object intensified one's emotions to a powerful degree.
After a long absence, magic wands play a very minor role In Super Mario Galaxy. In both Kamella battles, Kamella wields a magic wand. In ths game, it always has a Power Star in it, which powers the wand and is released upon defeating Kamella.
Magic wands return in the game New Super Mario Bros. Wii. Once again, they are weapons used by the seven Koopalings to defeat Mario and his friends. As with Super Mario Bros. 3, each Koopaling can generate spells of varying speed and intensity, with the exception of Lemmy and Wendy, who utilize circus balls and glowing rings, respectively. The spells emitted by the Koopalings' wands also bear the insignia of the Magikoopas (jets of light with a circle, triangle and square), indicating a probable connection.
Alongside the Koopalings, their magic wands also make a return in the game New Super Mario Bros. 2, where all the Koopalings, with the exception of Wendy O. Koopa use their wands in combat. In addition, although Lemmy retains his wand's ability to conjure circus balls, Morton's normal spells are instead replaced with conjuring spiked balls in his fight with Mario. All the Koopalings used their magic wands again in the final level where they attempt to defeat Mario by turning him into stone and making him fall in lava. The Koopalings eventually utilize their wands once again near the ending, this time to aid Bowser by having him grow larger, although this also resulted in them being hit by the newly huge Bowser.
The magic wands make their return in New Super Mario Bros. U, but only Larry, Iggy, and Ludwig retain them. Larry, as per usual shoots out blue fire with his wand. Iggy, as per usual, will shoot out green fire with his wand, although he will also fire red spellballs that, upon making contact with the magma in his cabin, will summon Magmaarghs. Ludwig fires his regular blue fire spells in threes as usual. However, he also utilized the wand to create two false duplicates of himself and the wand. The clones fire two magic blasts. Additionally, the orb of the magic wands now have purple glow to it whenever each of the three Koopalings are casting their fireballs.