From the Super Mario Wiki
Teehee Butterflies are flying insects that appear in Yoshi's Story and the Super Mario-Kun manga. They fly around and change color from pink to blue. Eating a pink one restores a Yoshi's health, but eating a blue depletes it, as indicated by a Message Block when it says that the blue ones taste bitter.
In the Super Mario-Kun manga, the baby Yoshis set out to find the legendary Teehee Butterfly so they can use its fabled restorative after Mario becomes exhausted. It seems harmless at first, but as the Yoshis attempt to catch it it turns vicious and retaliates. It repeatedly plays cruel pranks on the Yoshis and giggles afterwards. After Green Yoshi gets the upper hand and defeats the Teehee Butterfly, they feed it to Mario. But just before he eats it, the butterfly turns blue and has adverse effects.
The name of this enemy comes from the noise they make when they change colors.