I've been to Kefalonia several times in mid - late May and found the weather to be unpredictable. It is generally mild - low to mid 20s but it does rain and can be extremely windy.
I once got stranded in Fiskardo for 3 days waiting for a ferry to Levkada as they were cancelled due to thunderstorms and high wind. This year I was there for a week and the weather was mixed - couple of cloudy days with no rain, one or two rainy days but mostly lovely.
It's also worth noting that the weather varies a lot across different parts of the island. One day this year I woke up to cloud and 20C in Vassilikades, whereas it was 25C+, bright sun and zero clouds a couple of hours later at Xi. And still cloudy when I got back to Vassilikades.
So don't bank on sunshine, but go anyway, it's a lovely time of year. And of course you get much better photographs to remember your time if the sun isn't too bright!