Max Planck , Albert Einstein , and Niels Bohr postulated the occurrence of energy in discrete quantities ( quanta ) in order to explain phenomena such as the spectrum of black-body radiation , the photoelectric effect , and the stability and spectra of atoms .