Bean plants and every other species of land-based plant have adapted themselves to make great use of light. Plants take light and convert it into chemical energy in order to carry out their own life processes, for one. But beans and other plants don't actually utilize many of the colors of light contained within the light humans see. Rather, plants mostly pick out blue light and red light in visible light and make great use of just those two colors, though for different reasons.
Plants have to power two different growth responses within themselves, and they use red light and blue light to do so. For plants, red light is efficiently absorbed by cells within their leaves and elsewhere and then used to regulate how they flower and reproduce. Plants, though, absorb blue light through a different system of cells and then use it to grow leaves and branches. Without at least those two colors of light, bean plants will eventually wither away and then die.
Plants, including bean plants, are efficient at absorbing the right wavelengths of light but inefficient at absorbing the wrong wavelengths. Red light and blue light are both shorter wavelengths than orange, yellow, green, indigo and violet light and are fairly easily absorbed by plants. Green light is almost completely unusable by plants and is reflected away, which is why plants appear green to human eyes. Yellow light is also poorly utilized by bean and other plants and is only partially absorbed by them.
When growing any plant, including bean plants, ensuring they get enough blue light is most important. Blue light, outside of any flowering or reproductive need by a plant, provides the right wavelength of light for plants to growth robustly. Sunlight is naturally suffused with blue light and red light, and there are artificial light sources for plants that can provide blue light and red light as well. Good sources of blue light include fluorescent lights, while red light can be found in incandescent bulbs.
Exposing a bean plant only to red light can help it grow tall. The issue with red light and plants, though, is that while plants grow tall under it, they also grow spindly and thin. For many bean plant species like string beans, tall, thin and spindly growth may actually be a desirable trait. If you want bean plants that are more vigorous, however, ensure they receive healthy amounts of blue light whenever possible along with a little red light, if truly needed.