  Recently, the nonlinear electrodynamics (NED) has been gaining attention to
generate primordial magnetic fields in the Universe and also to resolve
singularity problems. Moreover, recent works have shown the crucial role of the
NED on the inflation. This paper provides a new approach based on a new model
of NED as a source of gravitation to remove the cosmic singularity at the big
bang and explain the cosmic acceleration during the inflation era on the
background of stochastic magnetic field. Also, we found a realization of a
cyclic Universe, free of initial singularity, due to the proposed NED energy
density. In addition, we explore whether a NED field without or with matter can
be the origin of the late-time acceleration. For this we obtain explicit
equations for $H(z)$ and perform a MCMC analysis to constrain the NED
parameters by using $31$ observational Hubble data (OHD) obtained from cosmic
chronometers covering the redshift range $0 < z < 1.97$; and with the
joint-light-analysis (JLA) SNIa compilation consisting in $740$ data points in
the range $0.01<z<1.2$. All our constraints on the current magnetic field give
$B_{0}\sim 10^{-31}\mathrm{cm^{-1}}$, which are larger than the upper limit
$10^{-33}\mathrm{cm^{-1}}$ by the Planck satellite implying that NED
cosmologies could not be suitable to explain the Universe late-time dynamics.
However, the current data is able to falsify the scenario at late times.
Indeed, one is able to reconstruct the deceleration parameter $q(z)$ using the
best fit values of the parameters obtained from OHD and SNIa data sets. If the
matter component is not included, the data sets predict an accelerated phase in
the early Universe, but a non accelerated Universe is preferred in the current
epoch...
