  We investigate the influence of dark energy on structure formation, within
five different cosmological models, namely a concordance $\Lambda$CDM model,
two models with dynamical dark energy, viewed as a quintessence scalar field
(using a RP and a SUGRA potential form) and two extended quintessence models
(EQp and EQn) where the quintessence scalar field interacts non-minimally with
gravity (scalar-tensor theories). We adopted for all models the normalization
of the matter power spectrum $\sigma_{8}$ to match the CMB data. In the models
with dynamical dark energy and quintessence, we describe the equation of state
with $w_0\approx-0.9$, still within the range allowed by observations. For each
model, we have performed hydrodynamical simulations in a cosmological box of
$(300 \ {\rm{Mpc}} \ h^{-1})^{3}$ including baryons and allowing for cooling
and star formation. The contemporary presence of evolving dark energy and
baryon physics allows us to investigate the interplay between the different
background cosmology and the evolution of the luminous matter. Since cluster
baryon fraction can be used to constrain other cosmological parameters such as
$\Omega_{m}$, we also analyse how dark energy influences the baryon content of
galaxy clusters. We find that, in models with dynamical dark energy, the
evolving cosmological background leads to different star formation rates and
different formation histories of galaxy clusters, but the baryon physics is not
affected in a relevant way. We investigate several proxies of the cluster mass
function based on X-ray observables like temperature, luminosity, $M_{gas}$,
and $Y_{gas}$. We conclude that the X-ray temperature and $M_{gas}$ functions
are better diagnostic to disentangle the growth of structures among different
dark energy models. [Abridged]
