Affiliative social relationships have clear links to fitness in many species, yet exactly why that is the case remains elusive. We unify theory from socioecology and network science to set forth testable predictions of how individuals should invest in their social relationships given the relative benefits of different social strategies across environmental contexts. We propose that relationship quality provides access to social support, which can help animals faced with local pressures such as contest competition, while relationship quantity provides access to social tolerance, which can help with global pressures such as predation. The Adaptive Relationships Framework sets the foundation for the systematic study of how social and ecological pressures drive adaptive variation in the quality and quantity of social relationships.