You have from the time the butterpillaflora sprouts (3 minutes after you plant it) until the time it becomes "fully grown" (2 hours for the red / orange / yellow, 4 hours for the green / blue, 6 hours for the indigo / violet / rainbow) to spot a catepillar of the same color in someone else's garden. The caterpillar will crawl off to your garden and make a chrysalis on the plant. Once it becomes "fully grown", it will sparkle and will have the status of "Attracting a butterfly". It will continue this way until you have a butterfly spotted or until the plant becomes "ready for harvest" 5 days later. Once the butterfly is spotted, the plant status changes to "fully grown" and it stops sparkling. You can only get one butterfly (with a possible twin or triplet) per plant.
More information can be found here:
https://www.fairylandgame.com/fbfairy/forums.php?tid=9355