Penetrating gamma-rays require complex instrumentation for astronomical spectroscopy measurements of gamma-rays from cosmic sources. Multiple-interaction detectors in space combined with sophisticated postprocessing of detector events on ground have lead to a spectroscopy performance which is now capable to provide new astrophysical insights. Spectral signatures in the MeV regime originate from transitions in the nuclei of atoms (rather than in their electron shell). Nuclear transitions are stimulated by either radioactive decays or high-energy nuclear collisions such as with cosmic rays. Gamma-ray lines have been detected from radioactive isotopes produced in nuclear burning inside stars and supernovae, and from energetic-particle interactions in solar flares. Radioactive-decay gamma-rays from 56 Ni directly reflect the source of supernova light. 44 Ti is produced in core-collapse supernova interiors, and the paucity of corresponding 44 Ti gamma-ray line sources reflects the variety of dynamical conditions herein. 26 Al and 60 Fe are dispersed in interstellar space from massive-star nucleosynthesis over millions of years. Gamma-rays from their decay are measured in detail by gamma-ray telescopes, astrophysical interpretations reach from massive-star interiors to dynamical processes in the interstellar medium. Nuclear de-excitation gamma-ray lines have been found in solar-flare events, and convey information about energetic-particle production in these events, and their interaction in the solar atmosphere. The annihilation of positrons leads to another type of cosmic gamma-ray source. The characteristic annihilation gamma-rays at 511 keV have been measured long ago in solar flares, and now throughout the interstellar medium of our Milky Way galaxy. But now a puzzle has appeared, as a surprising predominance of the central bulge region was determined. This requires either new positron sources or transport processes not yet known to us. In this paper we discuss instrumentation and data processing for cosmic gamma-ray spectroscopy, and the astrophysical issues and insights from these measurements.