With the discovery of rocky planets in the temperate habitable zone (HZ) of the close-by cool star TRAPPIST-1, the question of whether such planets could harbour life arises. Habitable planets around red dwarf stars can orbit in radiation environments that can be life-sterilizing. Ultraviolet (UV) flares from these stars are more frequent and intense than solar flares. Additionally, their temperate HZs are closer to the star. Here we present UV surface environment models for TRAPPIST-1's HZ planets and explore the implications for life. TRAPPIST-1 has high X-ray/extreme-ultraviolet activity, placing planetary atmospheres at risk from erosion. If a dense Earth-like atmosphere with a protective ozone layer existed on planets in the HZ of TRAPPIST-1, UV surface environments would be similar to the present-day Earth. However, an eroded or an anoxic atmosphere would allow more UV to reach the surface, making surface environments hostile even to highly UV tolerant terrestrial extremophiles. If future observations detect ozone in the atmospheres of any of the planets in the HZ of TRAPPIST-1, these would be interesting targets for the search for surface life. We anticipate our assay to be a starting point for in-depth exploration of stellar and atmospheric observations of the TRAPPIST-1 planets to constrain their UV surface habitability.