As an inevitable and natural consequence of the formation of a planetary system, comets play an important role in our understanding of the formation of (giant) planets and their dynamical evolution. The chemical characteristics of these objects shed light on the composition of the environments where giant planets form, and their orbital evolution carry signatures of the dynamics associated with the formation and evolution of planets. These properties of comets enable us to assess the significance and extent of their contributions to many aspects of a planetary system, including its habitability. In this talk, I will review these contributions and discuss the latter by placing them in the context of the greater science of astrobiology. I will also discuss their implications for the origin of life and the possibility of its existence elsewhere in the universe.