Crime is seldom considered as an outcome in public health research. Yet major theoretical and empirical developments in the field of criminology during the past 50 years suggest that the same social environmental factors which predict geographic variation in crime rates may also be relevant for explaining community variations in health and wellbeing. Understanding the causes of variability in crime across countries and across regions within a country will help us to solve one of the enduring puzzles in public health, viz. why some communities are healthier than others. The purpose of this paper is to present a conceptual framework for investigating the influence of the social context on community health, using crime as the indicator of collective wellbeing. We argue that two sets of societal characteristics influence the level of crime: the degree of relative deprivation in society (for instance, measured by the extent of income inequality), and the degree of cohesiveness in social relations among citizens (measured, for instance, by indicators of 'social capital' and 'collective efficacy'). We provided a test of our conceptual framework using state-level ecologic data on violent crimes and property crimes within the USA. Violent crimes (homicide, assault, robbery) were consistently associated with relative deprivation (income inequality) and indicators of low social capital. Among property crimes, burglary was also associated with deprivation and low social capital. Areas with high crime rates tend also to exhibit higher mortality rates from all causes, suggesting that crime and population health share the same social origins. Crime is thus a mirror of the quality of the social environment.