You are legally required to ensure that the tread depth on the tyre meets the current legal minimum tread depth.
It is advisable to consider replacing tyres some time before the minimum tread depth is reached. Stopping distances are greatly reduced as the tread wears, and as such safety is reduced. Especially in wet weather worn tyres are particularly dangerous as less water can be dispersed away from the tyre leading to reduced grip.
Checking the tyres regularly for wear is advisable, always refer back to your vehicle’s handbook for more details.