(copy pasted this from terraria wiki)
The Glow Tulip is a pet-summoning item that summons a Caveling Gardener pet that follows the player around. It can be found as a plant in the Underground or Cavern layers around the outskirts of the world. A set number of Glow Tulips are spawned during world generation: 2 in small worlds, 4 in medium worlds, and 6 in large worlds, split between the left and right sides of the world.
It can also be detected by the Metal Detector.
Notes
Glow Tulips are only generated during the initial world generation; they do not generate during gameplay or regrow after being harvested.
They generate at least 100 tiles away from the left and right borders of the world, between the Surface layer and 200 tiles above the bottom of the world.
They spawn on Dirt, grass (except Jungle Grass), Mud, Hive, Stone, Ebonstone, Crimstone, and moss.
Trivia
The Caveling Gardener is a reference to the survival sandbox game Core Keeper, where the Glow Tulip is a plant that can be found scattered around the map.