It's not a simple yes and no answer as it depends on the circumstances of the accident. Insurers may often state on their websites that having no MOT will invalidate car insurance as it's in their interest to ensure a vehicle is as road worthy as possible to minimise claims. This is often not the case however.
A situation where a driver had an accident, was at fault and caused significant damage to properties will have their vehicle assessed for roadworthiness at the point before the accident. A valid MOT is limited in relevance as a vehicle can of course be unroadworthy even with a valid MOT test certificate. Essentially it's whether the vehicle was roadworthy directly before the accident and is based on evidence obtained by the police and a conclusion reached by the insurance claims assessor. This can also include statements taken from witnesses, engineer reports and other evidence obtained from the claims investigation if necessary.
So as you may imagine, it can get a lot more complicated than simply stating that your insurance is invalid due to no valid MOT. Car insurers also have an obligation to the third parties involved in an accident that was not their fault. It wouldn't be appropriate if insurers refused to pay out simply if the accident was caused by a driver with no valid MOT. Where the lack of a valid MOT may be relevant in an insurance claim is if an accident was the direct consequence of not having a valid MOT. This would need to be established with an engineer's report where the claims assessor may refuse payment or offer a limited payment to the first parties (driver at fault that had the accident with no MOT) vehicle.
More often that not and especially in small claims, whether the vehicle has a valid MOT or not isn't usually a consideration of the insurers and they typically pay out without even questioning the MOT status. It could be argued that if a driver intentionally avoided obtaining a valid MOT for their vehicle and if as a result this action automatically invalidated their insurance policy, then what's the point of taking out the insurance?
The most important aspect of car insurance is to restore the third party (innocent party involved in an accident) and their property back to a state previous to the accident. Therefore the lack of a valid MOT cannot be automatically associated with invalid car insurance and must remain two separate offences in their own right.