Lightning and thunderstorms hit parts of the UK, with the downpours causing flash flooding in the worst affected areas.