Kastler was born in Guebwiller (Alsace, German Empire) and later attended the Lycée Bartholdi in Colmar, Alsace, and École Normale Supérieure in Paris in 1921. After his studies, in 1926 he began teaching physics at the Lycée of Mulhouse, and then taught at the University of Bordeaux, where he was a university professor until 1941. Georges Bruhat asked him to come back to the École Normale Supérieure, where he finally obtained a chair in 1952.
Collaborating with Jean Brossel, he researched quantum mechanics, the interaction between light and atoms, and spectroscopy. Kastler, working on combination of optical resonance and magnetic resonance, developed the technique of "optical pumping". Those works led to the completion of the theory of lasers and masers.
He won the Nobel Prize in Physics in 1966 "for the discovery and development of optical methods for studying Hertzian resonances in atoms".
He was president of the board of the Institut d'optique théorique et appliquée and served as the first chairman of the non-governmental organization (NGO) Action Against Hunger.
Kastler also wrote poetry (in German). In 1971 he published Europe, ma patrie: Deutsche Lieder eines französischen Europäers (i.e. Europe, my fatherland: German songs of a French European).
In 1976, Kastler was elected to the American Philosophical Society.
In 1978 he became foreign member of the Royal Netherlands Academy of Arts and Sciences.
In 1979, Kastler was awarded the Wilhelm Exner Medal.