We present a method, based on commutator methods, for the spectral analysis of uniquely ergodic dynamical systems. When applicable, it leads to the absolute continuity of the spectrum of the corresponding unitary operators. As an illustration, we consider time changes of horocycle flows, skew products over translations and Furstenberg transformations. For time changes of horocycle flows, we obtain absolute continuity under assumptions weaker than the ones to be found in the literature.