Technically, it is not illegal in the UK to drive while barefoot or wearing flip-flops, but there is a catch. Even though you can get behind the wheel while not wearing shoes or when wearing flip-flops, you must be able to operate the controls safely. If you have wet feet, for example, you might be putting yourself, your passengers and other road users at risk, as you are not able to drive the car safely, and this would be illegal.
Driving while wearing flip-flops is not illegal in itself, but that does not make it right. According to the Driving Standards Agency, the organisation that regulates the UK driving test, your choice of footwear is important. They recommend wearing suitable shoes, as driving barefoot or close to it means that you won’t have the same braking force as you would when wearing shoes.