There are two types of plants needed for butterfly gardening. Most beginning butterfly gardeners concentrate on "nectar" flowers. The nectar flowers that butterflies favor for food are often the same ones we gardeners choose for their beauty or fragrance. These same nectar flowers are the primary food sources for most butterflies. The more of a given nectar flower that is in bloom, the more likely butterflies will be to select it for its nectar. To make the most of the butterfly-attracting capabilities of nectar flowers, it's best to plant them in mass. Massed nectar flowers provide a large area of color or a strong scent that will attract butterflies. Also, the larger the number of nectar-brimming blossoms, the longer the butterflies will stay in your garden.
Common nectar plants include Aster (Aster spp.), Black-Eyed Susan (Rudbeckia hirta), Blazing Stars (Liatris spp.), Butterfly Bush (Buddleia), Butterfly Milkweed (Asclepias tuberosa), Common Milkweed (Asclepias syriaca), Coneflowers (Echinacea purpurea), Coreopsis (Coreopsis spp.), Cosmos (Cosmos spp.), Dianthus Family (Dianthus spp.), Lantana (Lantana camara), Marigold (Tagetes spp.), Petunia (Petunia x hybrida), Salvia (Salvia spp.), Shasta Daisy (Leucanthemum spp.), Sunflower (Helianthus spp.), Swamp Milkweed (Asclepias incarnata), Tall Verbena (Verbena bonariensis), Yarrow (Achillea spp.), and Zinnia (Zinnia elegans).
According to The Butterfly Site, "Because tiny caterpillars cannot travel far to find their own food, the female butterfly locates and lays her eggs on only the type of plant that the caterpillar can use as food. Most species of caterpillars are particular about the type of plants they can eat. If the egg was not placed on the correct plant, the caterpillar hatching from that egg will not survive. Many gardeners do not like to see plants in their gardens that have been chewed on by bugs. To avoid this, you may want to locate your butterfly host plants in areas that are not highly visible, but still a short distance from the butterfly nectar plants. If you do not provide host plants, you will have fewer butterflies." Specific host plants are required by each butterfly species. (Monarch--milkweed; Tiger Swallowtail--willow; Viceroy--willow; American Lady--sunflower, pussy-toe, silver brocade, ironweed, pearly everlasting, mallow).
Two excellent online sources for butterfly-specific nectar and host plants are Garden with Wings and The Butterfly Site.
"Just living is not enough," said the butterfly, "one must have sunshine, freedom and a little flower."
--Hans Christian Anderson.