A habitat will be constantly bombarded by micrometeoroids. Although moving fast (around 30,000 kms/hr) they are very small (typical size range 10-100 microns) and will do no more than abrade the habitat outer shell. Experience with the ISS suggests that any damage is minor.
Large meteorites which could destroy all or part of the habitat will be exceedingly rare – once every few million years (only 4 a year land on Earth, on average, and it is a vastly bigger target). In any case they could be detected if their trajectory comes towards the habitat, and deflected or destroyed before they get there.
The main issue is smaller (1 to 10gm) objects which could be more difficult to detect. A large habitat might expect one of these every two years or so. Even if undetected (and one may assume that detection technology will improve) the worst that can happen is a small air leak which could be fixed before significant amounts of air escape.
Actually I think that the worst risks of catastrophic impact would not be natural, but human. A habitat would have to be strong enough to cope with a crash from a wayward spaceship. In the case of deliberate violence, you would not need a nuclear bomb to destroy a habitat, high explosives would do – and it would naïve not to assume that this would not be a risk. It takes mutually assured destruction to a new and lower level. As well as draconian arms control, one hopes that as with nuclear weapons on earth, the risk of mutual destruction (and detection of any incoming weapon) will suffice. Funny, but other commentators on space habitats never mention this: they must have a more benign view of human nature, or else a naïve one.
Protecting Habitats from Cosmic Radiation