We present the Sunyaev-Zeldovich (SZ) signal-to-richness scaling relation (Y500-N200) for the MaxBCG cluster catalogue. Employing a multi-frequency matched filter on the Planck sky maps, we measure the SZ signal for each cluster by adapting the filter according to weak-lensing calibrated mass-richness relations (N200-M500). We bin our individual measurements and detect the SZ signal down to the lowest richness systems (N200=10) with high significance, achieving a detection of the SZ signal in systems with mass as low as M500~5e13 Msolar. The observed Y500-N200 relation is well modeled by a power law over the full richness range. It has a lower normalisation at given N200 than predicted based on X-ray models and published mass-richness relations. An X-ray subsample, however, does conform to the predicted scaling, and model predictions do reproduce the relation between our measured bin-average SZ signal and measured bin-average X-ray luminosities. At fixed richness, we find an intrinsic dispersion in the Y500-N200 relation of 60% rising to of order 100% at low richness. Thanks to its all-sky coverage, Planck provides observations for more than 13,000 MaxBCG clusters and an unprecedented SZ/optical data set, extending the list of known cluster scaling laws to include SZ-optical properties. The data set offers essential clues for models of galaxy formation. Moreover, the lower normalisation of the SZ-mass relation implied by the observed SZ-richness scaling has important consequences for cluster physics and cosmological studies with SZ clusters.