We present a theoretical analysis of the spectral features of coherent light pulses traveling in a one-dimensional waveguide with an embedded two-level quantum system. In particular, we clarify and explain the relevant physical mechanisms that lead to a rich variety of distinct features in the spectrum of the scattered light. This includes the phenomenon of discrete steps in the transmitted intensity as a function of the excitation amplitude, frequency mixing as a consequence of cascaded nonlinear processes, and the role of atom-photon bound states.