Lightning and wind are the primary weather concerns that preclude rocket launch.
A rocket's control system needs to compensate for lots of un-modeled or difficult to model factors. For example, uncertainty in mass properties, engine performance, mechanical alignments, errors in inertial measurement units (IMU), gyroscopes, GPS, etc. If any of these errors become too large the system will not longer be able to compensate, the system will become uncontrollable, and the mission will be lost.
Wind, unsurprisingly, is one of these uncertain factors, and especially wind shears, which are rapid changes in wind direction as a function of location, are difficult for control systems to handle because they can put enormous aerodynamic loads on a vehicle very quickly.
Lightning is dangerous for entirely different reasons. Rockets are full of sensitive electronics, attract lightning nicely (even when not grounded), and are vulnerable to direct lightning strike. Even something as typically benign as a reset or temporarily glitch that could potentially be tolerated in a satellite would be disastrous to a rocket under powered flight. Airplanes avoid lightning storms for the same reason, although they have more margin available to incorporate lightning mitigation into their designs.
For these reasons (and to a lesser extent others, such as the extreme temperature example provided in another answer), rockets launches are frequently delayed for ideal conditions. There's no sense in risking a rocket and payload worth hundreds of millions of dollars for a week.
In contrast, rockets that must be able to be launched in at a moments notice (think ICBMs and SLBMs) are designed with very different requirements. Here, the performance hit taken to design robustness to weather is accepted because a weapon isn't very useful if you have to wait for the storm to pass before it can be fired.