  We use hydrodynamical simulations of different dark energy cosmologies to
investigate the concentration-mass (c-M) relation in galaxy clusters. In
particular, we consider a reference \Lambda CDM model, two quintessence models
with inverse power-law potentials (RP and SUGRA), and two extended quintessence
models, one with positive and one with negative coupling with gravity (EQp and
EQn respectively). All the models are normalized in order to match CMB data
from WMAP3. We fit both the dark matter only and the total mass profile with a
NFW profile, and recover the concentration of each halo from the fit using
different definition. We consider both the complete catalog of clusters and
groups and subsamples of objects at different level of relaxation. We find that
the definition itself of the concentration can lead to differences up to 20% in
its value and that these differences are smaller when more relaxed objects are
considered. The c-M relation of our reference \Lambda CDM model is in good
agreement with the results in literature, and relaxed objects have a higher
normalization and a shallower slope with respect to the complete sample. The
inclusion of baryon physics is found to influence more high-mass systems than
low-mass ones, due to a higher concentration of baryons in the inner regions of
massive halos. For the different dark energy models, we find that for \Lambda
CDM, RP and SUGRA the normalization of the c-M relation is linked to the growth
factor, with models having a higher value of \sigma 8 D+ having also a higher
normalization. This simple scheme is no longer valid for EQp and EQn because in
these models a time dependent effective gravitational interaction, whose
redshift evolution depends on the sign of the coupling, is present. This leads
to a decrease (increase) of the expected normalization in the EQp (EQn) model.
[Abridged]
