Why does it rain during the sunny day?
I think Wikipedia explains quite well. It is the wind that transport the airborne water droplets from a nearby showering cloud. It is quite common in UK especially near the coast which is often very windy. Usually the weather forecast will say that it has scattered shower with sunny spell.
https://en.wikipedia.org/wiki/Sunshower