No, closure merely prevents them from using the railway. If they choose to go by car instead and get injured or killed on the roads, that’s nothing to do with the railway. On the other hand, if the same happens on railway infrastructure because they’ve continued to operate when it’s unsafe, it very much will be the railway’s problem, so why take the risk?
There is a risk involved with absolutely everything, including not running a service or (often) as an individual, not actually doing anything.
Say for example that a TOC has decided to cancel all their train services, some passengers are therefore waiting on a platform while they try to work out what to do next. Then a tree falls on them. If the trains were running, said passengers may well have not been on the platform at the time the tree fell, because they would have been on the train that had already left the station. The other side being that the tree may have fallen on a train. If the tree had fallen as a train approached, chances are that if the train was a stopping service, the driver would either have been able to stop, or reduce the speed of the train so that the resulting collision would have been minor.
Managing risk is not really about minimising risk, because you can't completely minimise risk. But about making good informed decisions to balance risk against the benefits of an activity.
I think the modern railway is more risk averse than it needs to be in some situations. But some of this is due to the lack of resources. If the vegetation including trees along the line side was better controlled, there would be less reason to impose blanket speed restrictions on many lines during windy or stormy weather for example.
With flooding, again, TOCs choose not to run stock/trains along flooded lines (that are open to traffic) not because it is unsafe, but because of the increased maintenance costs (including the replacement parts) that would result from trains running through flood water.
In many places, the real problem are the limitations with either the drainage systems (which may include a lack of maintenance - blocked or partly blocked drains for example or the design of the drainage system) or with how to deal with run off from the surrounding (non-railway) land, or with overflows from aqueducts (if the stream or river is so high that water is overtopping the overflow for an aqueduct, it affects the railway, but dealing with the root cause is rather outside the railways area of control).
Ultimately, dealing with the root causes, often it comes down to money or rather, the lack of it, and how the government decides to deal with it (or not).
Cancelling services, blanket speed restrictions and other similar measures are therefore often a symptom of a lack of money rather than sensible logical risk management.
At least, that's my opinion.