Normally if a driver has a medical condition that makes it unsafe for them to drive, their doctor will notify the DMV and their driving privileges will be limited or revoked for safety purposes. A handful of insurance companies do require that their agents confirm or inquire about medical conditions of any drivers listed on the policy that may make them unsafe on the road. In some instances, a doctors approval may be required before a policy can be issued, but that is not the case with most companies. These types of questions are normally a formality and simply asked by the agent to confirm the company's underwriting requirements.
If there is an accident and the driver admits that they were having a medical emergency or were incapacitated, taken to a hospital, and a doctor diagnosed them with a medical issue that led to the crash then it could be used against that driver. Outside of that, medical conditions cannot be used against you