Despite the great successes of the Cold Dark Matter (CDM) model in explaining a wide range of observations of the global evolution and the formation of galaxies and large-scale structure in the Universe, the origin and microscopic nature of dark matter is still unknown. The most common form of CDM considered to-date is that of Weakly Interacting Massive Particles (WIMPs), but, so far, attempts to detect WIMPs directly or indirectly have not yet succeeded, and the allowed range of particle parameters has been significantly restricted. Some of the cosmological predictions for this kind of CDM are even in apparent conflict with observations (e.g. cuspy/cored halos and the predicted overabundance of satellite dwarf galaxies). For these reasons, it is important to consider the consequences of different forms of CDM. We focus here on the hypothesis that the dark matter is comprised, instead, of ultralight bosons that form a Bose-Einstein Condensate (BEC), described by a complex scalar field. We start from the Klein-Gordon and Einstein field equations to describe the evolution of the Friedmann-Robertson-Walker (FRW) universe in the presence of this kind of
dark matter. We find that, in addition to the phases of radiation-domination, matter-domination and Lambda-domination familiar from the standard "LambdaCDM" model, there is an earlier phase of "scalar-field"-domination, which is special to our model. In addition, while WIMP CDM is non-relativistic at all times after it decouples, the equation of state of BEC scalar field dark matter (SFDM) is found to be relativistic at early times, evolving from stiff to radiation-like, before it becomes non-relativistic and CDM-like at late times. The timing of the transitions between these phases and regimes is shown to yield fundamental constraints on the SFDM model parameters, particle mass and self-interaction coupling strength. We show that SFDM is compatible with observations of the evolving background universe, by deriving the range of particle parameters required to match observations of the cosmic microwave background (CMB) and the abundances of the light elements produced by Big Bang nucleosynthesis (BBN), including N_eff, the effective number of neutrino species, and the epoch of matter-radiation equality z_eq. Indeed, our model can accomodate current observations in which N_eff is higher at the BBN epoch than at z_eq, probed by the CMB, which is otherwise unexplained by the standard CDM model involving WIMPs. We also show that SFDM without self-interaction (also called ‘Fuzzy Dark Matter’) is not able to comply with the current constraints from BBN, and can therefore be ruled out.