  Context: Giant radio galaxies (with projected linear size of radio structure
larger than 0.7 Mpc) are very rare and unusual objects. Only $\sim$5% of
extended radio sources reach such sizes. Understanding of the processes
responsible for their large sizes is crucial to further our knowledge about the
radio source's evolution.
  Aims: We check the hypothesis that giants become extremely large due to the
specific history of their host galaxy formation, as well as in the context of
the cluster or group of galaxies where they evolve. Therefore we study the star
formation histories in their host galaxies and in galaxies located in their
neighbourhood.
  Methods: We studied 41 giant-size radio galaxies as well as galaxies located
within a radius of 5 Mpc around giants to verify whether the external
conditions of the intergalactic medium somehow influence the internal evolution
of galaxies in the group/cluster. We compared the results with a control sample
of smaller-sized Fanaroff--Riley type II radio galaxies and their neighbouring
galaxies. We fit stellar continua in all galaxy spectra using the spectral
synthesis code STARLIGHT and provide statistical analysis of the results.
  Results: We find that hosts of giant radio galaxies have a larger amount of
intermediate age stellar populations compared with smaller-sized FRII radio
sources. The same result is also visible when we compare neighbouring galaxies
located up to 1.5 Mpc around giants and FRIIs. This may be evidence that star
formation in groups with giants was triggered due to global processes occurring
in the ambient intergalactic medium. These processes may also contribute to
mechanisms responsible for the extremely large sizes of giants.
