The dark sectors of our Universe, dark matter and dark energy, together constitute about 96 % of the total energy content of the Universe. To date, we only have observational evidence for their existence. What is still lacking is a complete theoretical framework consistent with all observational data to embed a dark matter particle or component into the standard models of particle physics and cosmology, as well as an explanation for the nature or origin of dark energy. Since the discovery of these dark components decades ago, a variety of different theories have been proposed to overcome the shortcomings of our current standard models. To assess the viability of these non-standard theories, they ideally should be tested against all relevant available datasets. In this thesis, I show two examples of how cosmological and astrophysical observables are used to constrain or even rule out non-standard cosmological models. Further, I present the first software tool that provides a general framework to test non-standard physics with global fits to data from particle physics and cosmology simultaneously. The first example is minimally coupled covariant Galileons, a modification of General Relativity to explain dark energy without the need for a fine-tuned cosmological constant. I demonstrate how the combination of constraints arising from the integrated Sachs-Wolf effect and the propagation speed of gravitational waves can rule out all three branches of the theory. The second example shows how the existence and parameter space of cosmic superstrings can be constrained. These are the hypothesised fundamental building blocks of Type IIb Superstring theory, stretched out to cosmological scales during the phase of inflation. The theory can be tested through the unique microlensing signature of cosmic uperstrings when crossing the line of sight of an observer monitoring a point-like source. I show how, based on simulations, we can estimate the expected detection rates from observations of distant Type Ia Supernovae and stars in Andromeda; from these Estimates I assess the implications for the theory. Finally, I present CosmoBit, a new module for the Global and Modular Beyond-Standard Model Inference Tool (GAMBIT). \gambit allows the user to test a variety of extensions to the Standard Model of particle physics against data from, e.g. collider searches, dark matter direct and indirect detection experiments, as well as laboratory measurements of neutrino properties. CosmoBit augments this with the inclusion of cosmological likelihoods. This addition opens up the possibility to test a given model against data from, e.g. the Big Bang Nucleosynthesis proceeding minutes after the Big Bang, probes of the Cosmic Microwave Background ~ 380,000 years later, and (laboratory) measurements from the present day, 13.8 billion years after the Big Bang. Including measurements that span several different epochs and orders of magnitude in energy, the combination of CosmoBit with other GAMBIT modules provides a promising tool for shedding light on the dark sectors of the Universe.