Environmental influences on immune phenotypes are well-documented, but our understanding of which elements of the environment affect immune systems, and how, remains vague. Behaviors, including socializing with others, are central to an individual’s interaction with its environment. We therefore tracked behavior of rewilded laboratory mice of three inbred strains in outdoor enclosures and examined contributions of behavior, including associations measured from spatiotemporal co-occurrences, to immune phenotypes. We found extensive variation in individual and social behavior among and within mouse strains upon rewilding. In addition, we found that the more associated two individuals were, the more similar their immune phenotypes were. Spatiotemporal association was particularly predictive of similar memory T and B cell profiles and was more influential than sibling relationships or shared infection status. These results highlight the importance of shared spatiotemporal activity patterns and/or social networks for immune phenotype and suggest potential immunological correlates of social life.