Since butterflies can't swim, feed, or rest on water, they won't visit ponds or lakes. They need a place to stand while they drink. A small sand pit kept moist in the garden will do. As the puddle evaporates, nutrients, such as salt and amino acids tend to concentrate in the ground. Males especially need these substances for courtship and mating.
Butterflies can easily find nectar sources.
Finding host plants for caterpillars, however, is becoming difficult with the loss of native habitats, and habitat loss is a primary reason for the decline in butterfly populations. Most butterflies will lay their eggs and the caterpillars will feed only on certain types of plants or trees. The Monarch, for example, will lay its eggs and the caterpillars will feed only on milkweed, a generally unwanted wildflower. If the host plant is not available, then the eggs won't be laid, the caterpillars won't have their preferred food and the next generation of butterflies will be lost. The Harvard Common Press.