Abstract: A crepuscular or nocturnal lifestyle has evolved in bees several times independently, probably to explore rewarding pollen sources without competition and to minimize predation and nest parasites. Despite these obvious advantages, only few bee species are nocturnal. Here we show that the sensitivity of the bee apposition eye is a major factor limiting the ability to forage in dim light. We present data on eye size, foraging times, and light levels for Megalopta genalis (Augochlorini, Halictidae) in Panama, and Lasioglossum (Sphecodogastra) sp. (Halictini, Halictidae) in Utah, USA. M. genalis females forage exclusively during twilight, but as a result of dim light levels in the rain forest, they are adapted to extremely low intensities. The likely factor limiting their foraging activity is finding their nest entrance on return from a foraging trip. The lowest light intensity at which they can do this, both in the morning and the evening, is 0.0001 cd m−2. Therefore, they leave the nest at dimmer light levels in the morning than in the evening. Lasioglossum (Sphecodogastra) foraging is limited by light intensity in the evening, but probably by temperature in the morning in the temperate climate of Utah. We propose that the evolution of nocturnality in bees was favored by the large variance in the size of females.