  Brightest cluster galaxies (BCGs) have grown by accreting numerous smaller
galaxies and can be used as tracers of cluster formation and evolution in the
cosmic web. However, there is still a controversy on the main epoch of
formation of BCGs, since some authors believe they have already formed before
redshift z=2, while others still find them to evolve at more recent epochs. We
aim to analyse the physical properties of a large sample of BCGs covering a
wide redshift range up to z=1.8 and analysed in a homogeneous way, to see if
their characteristics vary with redshift. As a first step, we also present a
new tool to define for each cluster which galaxy is the BCG. For a sample of
137 clusters with HST images in the optical and/or infrared, we analyse the BCG
properties by applying GALFIT with one or two Sersic components. For each BCG,
we compute the Sersic index, effective radius, major axis position angle,
surface brightness. We then search for correlations of these quantities with
redshift. We find that BCGs follow the Kormendy relation (between the effective
radius and the mean surface brightness), with a slope that remains constant
with redshift, but with a variation with redshift of the ordinate at the
origin. Although the trends are faint, we find that both the absolute
magnitudes and effective radii tend to become respectively brighter and bigger
with decreasing redshift. On the other hand, we find no significant correlation
of the mean surface brightnesses or Sersic indices with redshift. The major
axes of the cluster elongations and of the BCGs agree within 30 degrees for 73%
of our clusters at redshift z <= 0.9. Our results agree with the BCGs being
mainly formed before redshift z=2. The alignment of the major axes of BCGs with
their clusters agree with the general idea that BCGs form at the same time as
clusters by accreting matter along the filaments of the cosmic web.
