The goddess Persephone, just before she was kidnapped into the underworld, was gathering iris for garlands, along with roses, violets, crocus, narcissus and hyacinth.
Unlike the story in many myths, Iris was not turned into a flower by one of the gods. In fact, it is not really clear whether the flower was named for the goddess or for the rainbow, with its bright colors. In the myths, Iris was never explicitly associated with the rainbow, although they had the same name.
Plato (Cratylus 408b) said that the names of both the messenger god Hermes and Iris were derived from the word "eirein", from the verb "to speak." If so, then Iris's name means "speaker," and the rainbow was presumably named for her, although the reason is not clear.
On the other hand, Pliny, in his Natural History (Chapter 19), said, "the flower being of various colours, like the rainbow, to which circumstance it is indebted for its name."
Iris was one of the messengers of the gods. Hesiod (who was known to make things up) called her the granddaughter of Gaia (Earth) and Ocean. She had an important role in the Iliad, delivering messages from Zeus, both to the other gods and to the mortals.
"Up, go, swift Iris; unto the lord Poseidon bear thou all these tidings, and see thou tell him true.  Bid him cease from war and battle, and go to join the tribes of gods, or into the bright sea." . . . So spake he, and wind-footed, swift Iris failed not to hearken, but went down from the hills of Ida to sacred Ilios.  And as when from the clouds there flieth snow or chill hail, driven by the blast of the North Wind that is born in the bright heaven, even so fleetly sped in her eagerness swift Iris; and she drew nigh, and spake to the glorious Shaker of Earth, saying: "A message for thee, O Earth-Enfolder, thou dark-haired god,  have I come hither to bring from Zeus, that beareth the aegis. (Iliad 15.149)
Her epithets were mostly those of speed: "wind-footed," "swift-footed," "storm-footed." She was also frequently called "golden-winged."
She had other functions as well. According to Hesiod, when the gods quarrel,
"Zeus sends Iris
to carry the many-storied water
that the gods swear their great oath on,
thence, in a golden pitcher."(Theogony, 784-785)
Iris was often depicted in Greek vase paintings, usually winged and carrying a herald's staff like the staff carried by Hermes, who later took over the role of messenger in the myths, replacing Iris. This staff was an important symbol that conferred immunity on the speaker in time of war, when the herald went out to speak to the armies on the battlefield. It is now known as the caduceus.
The image in the center shows Iris pouring out the water of the Styx from her golden pitcher.
In some mythologies, the rainbow is considered a bridge connecting the realms of the gods with Earth. This might be a path taken by a messenger of the gods and thus a possible explanation of the connection between the rainbow and the messenger. There is no explicit connection of this sort in the Greek myths as we know them, however.
The Greeks themselves, at least in the time of Homer, do not seem to have called the flower by the name iris. The name they gave it was "agallis."