Saturday will be dry with sunny spells, feeling warm for much of the country with highs of 24C (75.2F) in London and the South East, forecasters at the Met Office said.
Scotland will be cloudy with light showers.
But thunderstorms will begin to move in from the South West of England overnight, bringing with them heavy rain and lightning on Sunday.
By the afternoon, there is a chance of torrential downpours and lighting for most of the UK, with possible flooding, power cuts and disruption to travel, the Met Office warned.
Yellow weather warnings for thunderstorms are in place across much of England, Scotland and Wales from noon on Sunday and remain in place in England and Wales until midnight on Tuesday, when "potentially severe" storms are described as "likely".
Becky Mitchell, a meteorologist for the Met Office, said: "Going into Sunday there will be a drastic change in the weather type bringing potential disruption.
"There is the chance of flash flooding and torrential downpours causing some travel disruption for commuters on Monday.
"The band of heavy rain will move northwards going into the start of the week, and the yellow warning of thunderstorms will remain for both Monday and Tuesday."
Moving into next week, the temperature will begin to rise and most of the UK will be very warm and humid on Tuesday as southerly air moves in from Spain and North Africa.
Though not always sunny, the exceptional heat for some areas could reach 30C (86F) in London and the South East, while the rest of Europe bakes in record-breaking temperatures.
Ms Mitchell added: "The mixture of heat and humidity will push temperatures into the low 30s when the sun comes out, staying warm at night."
The temperature is expected to rise further in the UK as the week progresses.
The average temperature for this time of year is between 17C (62.6F) and 21C (69.8F), and the temperature should stay above this for most of the weekend.
People living in a Lincolnshire town were told on Friday it is safe to return to their homes after extreme rainfall last week flooded 137 properties.
More than two months' worth of rain fell in three days last week, causing a breach of the flood bank on the River Steeping.
"Keeping people safe and helping them get back home is our top priority and we are pleased that over 500 people can return to their properties today."
An Anglia Water spokesman said: "We'd like to thank local residents for their help and co-operation over the last week in limiting the use of their facilities.
"We're pleased to say water levels in the network are now returning to normal, so people can use their toilets, showers and washing machines as they would usually."