Methods are developed, which use the pulse-height spectra of SiPMs measured in the dark and illuminated by pulsed light, to determine the pulse shape, the dark-count rate, the gain, the average number of photons initiating a Geiger discharge, the probabilities for prompt cross-talk and after-pulses, as well as the electronics noise and the gain fluctuations between and in pixels. The entire pulse-height spectra, including the background regions in-between the peaks corresponding to different number of Geiger discharges, are described by single functions. As a demonstration, the model is used to characterise a KETEK SiPM with 4384 pixels of 15 µm×15 µm area for voltages between 2.5 and 8 V above the breakdown voltage. The results are compared to other methods of characterising SiPMs. Finally, examples are given, how the complete description of the pulse-eight spectra can be used to optimise the operating voltage of SiPMs, and a method for an in-situ calibration and monitoring of SiPMs, suited for large-scale applications, is proposed.