Lack of water is the primary cause of wilting. Bean plants have broad leaves. Moisture evaporates quickly over the wide surface. Test the soil with your finger to see if it's dry. If it is, add water. If the soil is moist but the weather hot, the bean plants will recover during the cool evening.
Young bean plants need a boost of nitrogen when they're first planted. Yellowing leaves are a sign of nitrogen deficiency. Feed with a fertilizer high in nitrogen.
Young bean plants are susceptible to being cut off at the soil line by cut worms. They are also harvested by pack rats. If your bean plants disappear or are cut down overnight, these could be the culprits. Place aluminum foil around the main stem of the plant.
Lack of sunshine causes slow growth. The plant has few leaves and doesn't thrive. Green beans require a minimum of six hours of sunlight a day, and more is better.