As population density increases, environmental hygiene and public health become increasingly severe. As the space where residents stay for the longest time and have the most profound impact on their physical and mental health, the quality of the environment in urban communities largely determines the degree to which residents engage in physical activity, bear the risk of pollution exposure, and obtain healthy food. Therefore, in order to ensure the physical and mental health of residents, this study proposes community planning guided by environmental hygiene and public health, and establishes an environmental health assessment system for this purpose. This system evaluates the community environment from four aspects: land use, service facilities, site convenience, and environmental quality. Established the diversity, density, road network connectivity and facilities accessibility nine criteria, as well as the land function of mix, plot ratio, food environment, network ring and connected index, pavement risk level, green configuration and neighborhood material environment disorder degree of 27 indicators of community built environmental evaluation index system. The data is collected through field survey, questionnaire distribution, resident interview and data mapping, and the established evaluation index system is used to evaluate the construction environment of the community. The experimental research data included population data, CAD plan, land use data, street data, POI point data, building data and bus station data, etc. 273 questionnaires were distributed, 264 were recovered, 8 invalid questionnaires were removed, and 256 valid questionnaires were obtained. These experiments confirm that land use, service facilities, site convenience, and environmental quality have a significant impact on the built environment of communities, with impact weights of 0.513, 0.227, 0.135, and 0.125, respectively. The above weights are calculated based on the index judgment matrix and the eigenvectors. The scores of land use, service facilities, site convenience, and environmental quality for the study subjects were 3.44, 1.46, 0.94, and 0.51, respectively, among them, the land use score is less than 3.85, the 1 service facility score is less than 1.71, the site convenience score is less than 1.01, and the environmental quality score is less than 0.94; indicating that the community has serious problems such as single land use types, pollution exposure, and difficulty in obtaining healthy food. Therefore, community planning and transformation based on land use, service facilities, venue convenience, and environmental quality can effectively improve the physical and mental health of residents. In the specific community transformation plan, artificial intelligence and data-driven methods can be used to optimize the land use plan, service facility configuration, site convenience transformation and environmental quality improvement, so as to formulate the optimal community transformation plan and improve the comfort and happiness of community residents. In the future, on the basis of the existing research, the selection of community types will be further enriched and the research cases will be expanded. And through the in-depth practical study of the case, the constructed evaluation index system is optimized and improved to make it more scientific. At the same time, as urban renewal and design have entered the era of stock planning, based on the more perfect evaluation index system, more specific and detailed system discussion of the built communities with public health problems, in order to provide more detailed services for the construction of a better and healthy living environment in the future.