From the Super Mario Wiki
A Floro Sprout is a mind-control seed used by the Floro Sapiens in Super Paper Mario. The Floro Sapiens plant them in the minds of Cragnons, forcing them to mine the jewels found in the Floro Caverns. These Cragnons, called Floro Cragniens, will cause Mario to lose points if he harms them. In Chapter 5-4, Dimentio borrows three Floro Sprouts from an unknown acquaintance, possibly King Croacus. The first Floro Sprout he plants in the mind of O'Chunks, forming what he calls "O'Cabbage". O'Cabbage randomly shouts out the names of vegetables, and is more powerful and tricky than the normal O'Chunks. Despite this, however, Mario and friends triumph over him and can then wear a Floro Sprout enabling Mario and co. to access a certain area not able to be accessed before.
The second and third Floro Spouts come into play late in the game in Castle Bleck, in Chapter 8-3. Answering "Yes" to Dimentio results in him placing the sprouts on Mario and Luigi, thus hypnotizing them and resulting in a Game Over. If the player refuses to join Dimentio, they will instead fight him as Luigi (without Pixls) and, after he is defeated, he will plant the second Floro Sprout in Luigi's mind under cover of an apparent suicide. After Count Bleck is defeated, Dimentio takes control of the Chaos Heart and causes this Floro Sprout to spontaneously grow, ensuring Luigi's cooperation while he was being merged with the Chaos Heart to create Super Dimentio and destroy his own companions.
As stated above, the first time a Floro Sprout was used on a major character was when Dimentio transformed O'Chunks into O'Cabbage. After beating O'Cabbage, the Floro Sprout he wore (then dead, despite its green appearance identical to that of living Floro Sprouts) popped off of his head, allowing him to regain his free will. Mario then decided to put the sprout on, as being in possession of a Floro Sprout was necessary to make it past a special ray located before the door to King Croacus's lair. After beating Chapter 5 of Super Paper Mario, Mario and friends' Floro Sprout remained in the "Important Things" section of the pause menu and could still be put on; as a matter of fact, wearing the dead Floro Sprout was still necessary to revisit King Croacus.