We have so far concentrated on the hypothesis that magnetic fields observed in galaxies and galaxy clusters arise due to dynamo amplification of weak seed fields. An interesting alternative is that the observed large-scale magnetic fields are a relic from the early Universe, arising perhaps during inflation or some other phase transition ( and references therein). It is well known that scalar (density or potential) perturbations and gravitational waves (or tensor perturbations) can be generated during inflation. Could magnetic field perturbations also be generated?
Indeed inflation provides several ideal conditions for the generation of a primordial field with large coherence scales . First the rapid expansion in the inflationary era provides the kinematical means to produce fields correlated on very large scales by just the exponential stretching of wave modes. Also vacuum fluctuations of the electromagnetic (or more correctly the hypermagnetic) field can be excited while a mode is within the Hubble radius and these can be transformed to classical fluctuations as it transits outside the Hubble radius. Finally, during inflation any existing charged particle densities are diluted drastically by the expansion, so that the universe is not a good conductor; thus magnetic flux conservation then does not exclude field generation from a zero field. There is however one major difficulty; since the standard electromagnetic action is conformally invariant, and the universe metric is conformally flat, one can transform the evolution equation for the magnetic field to its flat space version. The field then field always decreases with expansion as 1/a2, where a(t) is the expansion factor.
Therefore mechanisms for magnetic field generation need to invoke the breaking of conformal invariance of the electromagnetic action, which change the above behaviour to B ~ 1/a with typically << 1 for getting a strong field. Since a(t) is almost exponentially increasing during slow roll inflation, the predicted field amplitude is exponentially sensitive to any changes of the parameters of the model which affects . Therefore models of magnetic field generation can lead to fields as large as B ~ 10-9 G (as redshifted to the present epoch) down to fields which are much smaller than that required for even seeding the galactic dynamo. Note that the amplitude of scalar perturbations generated during inflation is also dependent on the parameters of the theory and has to be fixed by hand. But the sensitivity to parameters seems to be stronger for magnetic fields than for scalar perturbations due to the above reason.
Another possibility is magnetic field generation in various phase transitions, like the electroweak transition or the QCD transition due to causal processes. However these generically lead to a correlation scale of the field smaller than the Hubble radius at that epoch. Hence very tiny fields on galactic scales obtain, unless helicity is also generated; in which case one can have an inverse cascade of energy to larger scales .
If a primordial magnetic field with a present-day strength of even B ~ 10-9 G and coherent on Mpc scales is generated, it can strongly influence a number of astrophysical processes. For example, such primordial magnetic fields could induce temperature and polarization anisotropies in the Cosmic Microwave Background (CMB) (see  for a review). The signals that could be searched for include excess temperature anisotropies (from scalar, vortical and tensor perturbations), B-mode polarization, and non-Gaussian statistics . A field at a few nG level produces temperature anisotropies at the 5 K level, and B-mode polarization anisotropies 10 times smaller, and is therefore potentially detectable via the CMB anisotropies. An even smaller field, with B0 ~ 0.1 nG, could lead to structure formation at high redshift z > 15, and hence naturally impact on the re-ionization of the Universe . A 0.1nG field in the IGM could also be sheared and amplified due to flux freezing, during the collapse to form a galaxy and lead to the few µG field observed in disk galaxies (cf. ). Ofcourse, one may still need a dynamo to maintain such a field against decay and/or explain the observed global structure of disk galaxy fields . Weaker primordial fields can also provide a strong seed field for the dynamo. Overall, it is interesting to continue to look for evidence of such a primordial field.