To maintain a comfortable life it is necessary to pay special attention to environmental aspects. This issue is as relevant for small towns as it is for big cities. The most important tasks are studies of wastewater treatment based on the principles of energy efficiency. The article presents research on the choice of loading material (methods of selection and analysis of loading material). Also described is effective wastewater treatment technology from nitrogen compounds, methods of intensification of the biofilters. Technological schemes are given. The main attention is paid to the study of the four-zone scheme, in which the processes of denitrification-nitrification occur sequentially. Along with the control reactors with the sanitary and chemical analyses, implemented regular monitoring of the microbiological investigations of biomass, using light and electron microscopy. An energy-efficient solution for deep wastewater treatment using biofilters has been developed. Calculation methods are given. The studies will significantly reduce the amount of energy consumed, the cost of processing precipitation. And the achieved effect of wastewater treatment will prevent eutrophication of water bodies and therefore reduce the cost of drinking water treatment.