We present experimental investigations and numerical calculation of the shock wave emission and cavitation bubble expansion after optical breakdown in water with Hd:YAG laser pulses of 30 ps and 6 ns duration. The experimental investigations were done by time-resolved photography with a time resolution of 30 ps, or 6 ns, respectively, and a spatial resolution of 4 micrometers . Position and velocity of both the shock front and the bubble wall were determined, and the shock wave pressure p(r) was then calculated from the shock velocity. Calculations of the bubble formation and shock wave emission were performed using the Gilmore model of cavitation bubble dynamics. The calculations yield the dynamics of the bubble wall, the pressure evolution p(t) inside the bubble, and pressure profiles in the surrounding liquid at fixed times after the start of the laser pulse. The maximal shock wave pressure was measured to be 2400 MPa after a 1 mJ ns-pulse, and 1700 MPa after a ps-pulse of the same energy. The initial shock wave duration was slightly shorter for the ns-pulse than for the ps-pulse, and had a (calculated) value of 30 ns and 46 ns, respectively. Due to nonlinear effects, the duration increased to about 75 ns (measured for the ps-pulse) during propagation of the first few millimeters. A formation phase of the shock front was observed after the ns-pulse, but not after the ps-pulse, where the shock front arose within less than 100 ps after the end of the laser pulse. After shock front formation, the pressure decay was approximately proportional to r-2. The maximal bubble wall velocity was 1850 m/s after the 1 mJ ns-pulse, and 780 m/s after the ps-pulse. In general, good agreement was observed between the results of the calculations and the experimental data. The Gilmore model is therefore well suited to calculate the shock wave emission and the initial phase of bubble expansion after laser-induced plasma generation. Since it can cover a wide parameter range, it may serve as a tool for the optimization of laser parameters in medical laser applications.