You can attract bees by planting bee-friendly flowers, avoiding pesticides harmful to bees, and providing suitable nesting sites such as bee houses or areas of bare soil.