It's mainly just bad luck.
There is really only one relatively common weather condition that you don't want to launch a rocket into and that's a thunderstorm. Granted, high winds can also be problematic. And it should go without saying that you don't want to launch during a hurricane or tornado.
Rockets are perfectly capable of launching directly into a thunderstorm, just as a civil airliner might do, but there's a wee bit of a problem with doing so. Rockets are made of metal, and their exhaust is partially ionized, so during liftoff the entire rocket+exhaust stacktrail is like a giant conductive wire tying the rocket to the ground. If the rocket flies into a thunderstorm then it will attract lightning strikes. Rockets can be made to withstand such strikes, and most of the current flows over the skin of the vehicle (just as with an airliner) but that adds a lot of difficulty. This actually happened during the Apollo 12 launch, and the lightning strike caused a huge number of problems with the onboard computers and with the telemetry link until folks were able to fix the telemetry and then slowly get everything else in order (fortunately the flight computers continued running normally).
As with all inherently dangerous activities the basic principle is generally to "stack the odds in your favor", so if you can avoid launching a hypersonic rocket packed with literally kilotons of explosive fuel into a scenario where it is almost certain to draw a lightning strike then you do so.
So why does weather cause so many launch delays? Well, that's mostly just an issue for the US. For orbital dynamics reasons it is most beneficial to launch in an Easterly direction from lower latitudes. In the continental US the lowest latitudes are in Florida, which are conveniently on the coast facing the entire Atlantic Ocean to the East, so that's where the bulk of America's space launches occur from.
Coincidentally, South Florida also has the highest level of thunderstorm activity in the entire US. The area around Cape Canaveral typically sees a thunderstorm on one out of every five days of the year (for a total of 70 or more annually).
So a high risk of thunderstorms right on top of the hub of US space launch activity translates to a high volume of weather related scrubs.
The spaceport up in Virginia has it slightly better than South Florida but the high incidence of inclement weather there still makes for an unfortunate combination.