The purpose of this paper is to promote the construction of digital healthy cities and improve the living standards of urban residents. Based on this, this paper analyzes the development of healthy cities, and studies community public health safety emergency management and nursing insurance service optimization methods for healthy urban environment construction. First, the concept of digital healthy urban environment construction is discussed. Then, the role of environmental health is discussed. Finally, two methods are designed to study the emergency management of public health safety and nursing insurance services in urban communities under the condition of environmental health. The results show that in the environmental health score of the city, the scores of X1 (the urban air quality excellent rate) and X6 (citizens' satisfaction with the environmental quality) were relatively low between 2016 and 2018, below 0.5 points. The scores for the remaining 3 years were relatively high, above 0.5. The scores of X2 (green coverage rate of built-up area), X3 (average grade sound effect of environmental noise in urban area), X4 (harmless treatment rate of domestic waste) and X5 (centralized treatment rate of domestic sewage) were relatively high from 2016 to 2018, above 0.5 points, and relatively low in the remaining 3 years, below 0.5 points. Meanwhile, residents are very satisfied with information collection and information management in public health and safety emergency management, and the number of very satisfied people is basically more than 40%. Satisfaction with resource allocation and privacy management is high, and the number of very satisfied people is basically above 30%. However, the satisfaction with risk perception and management measures is very low, and the number of very satisfied people is basically below 20%. It shows that the current construction of the community's public health and safety emergency management system is relatively poor in terms of X2–X5, while the development of X1 and X6 is relatively mature. The research not only provides a reference for the construction and improvement of a digital healthy city, but also contributes to the improvement of the healthy life of urban residents.