Flowering plants have been shown to differ with regard to their attractiveness to parasitoids and nectar accessibility. These floral traits are likely to affect the foraging performance of parasitoids in agricultural landscapes. Using a spatially explicit simulation model we explore how the attractiveness and nectar availability of flowering field margins affects their impact on parasitoids and ultimately on pest populations in crops. The model simulates the movement, nectar feeding and parasitism of parasitoids in an agroecosystem composed of a crop and adjacent flower margin. The perception of olfactory cues emitted by flowers and host-infested plants drives the movement of the parasitoid. Its preference for floral nectar or hosts is described as a function of its internal energy status. Model validation reveals that simulations and measurements of the spatial distribution and energy status of parasitoids are generally in good agreement. Model simulations suggest that aggregation of parasitoids at flower strips are caused by a prolonged longevity of parasitoids feeding on floral nectar as well as by attraction of parasitoids from the surrounding area. We found no indication for depletion of parasitoids in the field interior as a result of migration towards flower strips. Simulations further suggest that the attractiveness of flowers is an important characteristic that should be taken into account for the selection of flowering plants. This study implies that tailoring nectar supply to the requirements of parasitoids holds potential to increase their effectiveness as biological control agents.