The refractive-index nonlinearities of intersubband transitions in GaN/AlN quantum-well waveguides are investigated. A large spectral broadening of TM-polarized near-infrared pulses is observed after propagation through these devices due to intersubband self-phase modulation. From the measured data, a nonlinear refractive index n2 of 1.8×10-12cm2/W is estimated at the operating wavelength of 1550 nm. A detailed theoretical model of the intersubband refractive index as a function of wavelength and optical intensity is then presented. This model assumes an inhomogeneously broadened transition line and is based on experimentally determined material and device parameters. The results of this study are finally used to discuss the prospects of nitride quantum wells for all-optical switching via cross-phase modulation.