No one can predict what the weather will be like in May 2022 but I have visited Puglia twice at this time of year in the past. For me this time of year is perfect as it’s not too hot for sightseeing and good fortune permitting the weather is warm enough for a bit of swimming and sunbathing. An added bonus is that the beaches will be quieter and the spring flowers are out in the beautiful countryside. You may need a jacket/jumper for the evenings as it can get cool when the sun goes down.
Agree, both my visits were in late May, and most days were sunny. I would not necessarily count on swimming though.
I'd say it's likely too cold for swimming - the beaches will just be opening, unless the weather is terrible, but the sea won't be warm yet. The temperature this year was around 20-22 degrees with a handful of days around 24-25, so lovely for sightseeing but I wouldn't count on it being a beach holiday. June, however, is perfect.
If you come from UK for sure you'll find it pretty warm :) but ofc it's a matter of luck, I remember that May 2019 was really cloudy. Anyway beaches will be open (generally from 15th may) and you won't sweat a lot while sightseeing