The parasitoid waspBathyplectes anurus(Hymenoptera: Ichneumonidae: Campopleginae) is a successful biocontrol agent against the alfalfa weevil,Hypera postica. This weevil is a serious pest of beneficial fabaceous plants such as alfalfa and Chinese milk vetch. One of the possible reasons for the success of this wasp in hot climates may be the ability of its cocooned larvae to repeatedly jump and roll until they relocate themselves away from detrimental sunlight and heat. It is not yet known which wavelengths of light trigger this avoidance behavior or the microstructure of the cocoon shell that might allow light transmission. Here, the response of the cocooned larvae to different wavelengths, and the microstructure, hardness, and elemental components of the cocoon shell were studied. A population of cocooned larvae were introduced on the boundary line between illuminated and shaded areas with blue, green, red, or near-infrared light-emitting diodes. The cocoons moved away from the blue and green light. The distance from the boundary to the cocoons in the shaded area was longer under these long wavelengths, followed by the red light and shortest under the near-infrared light and nil under darkness. No difference was found in mortality between different wavelengths after three days of illumination. Scanning electron microscope observations of the surface of the cocoon shell revealed that the belt-like central ridge was porous, which likely allows ventilation and light transmission. The surface of the cocoon shell showed a uniform distribution of sulfur, potentially aiding in the capture of green wavelengths. The ridge had twice the thickness of the main body and was 1.9 times harder than the main body. These results may be applied to better understand the individual responses of this biological control agent to modifications to their environment, including light pollution.