  A fraction of brightest cluster galaxies (BCGs) shows bright emission in the
UV and the blue part of the optical spectrum, which has been interpreted as
evidence of recent star formation. Most of these results are based on the
analysis of broadband photometric data. Here, we study the optical spectra of a
sample of 19 BCGs hosted by X-ray luminous galaxy clusters at 0.15 < z < 0.3, a
subset from the Canadian Cluster Comparison Project (CCCP) sample. We identify
plausible star formation histories of the galaxies by fitting Simple Stellar
Populations (SSPs) as well as composite populations, consisting of a young
stellar component superimposed on an intermediate/old stellar component, to
accurately constrain their star formation histories. We detect prominent young
(~200 Myr) stellar populations in 4 of the 19 galaxies. Of the four, the BCG in
Abell 1835 shows remarkable A-type stellar features indicating a relatively
large population of young stars, which is extremely unusual even amongst star
forming BCGs. We constrain the mass contribution of these young components to
the total stellar mass to be typically between 1% to 3%, but rising to 7% in
Abell 1835. We find that the four of the BCGs with strong evidence for recent
star formation (and only these four galaxies) are found within a projected
distance of 5 kpc of their host cluster's X-ray peak, and the diffuse, X-ray
gas surrounding the BCGs exhibit a ratio of the radiative cooling-to-free-fall
time ($t_{c}/t_{ff}$) of < 10. These are also some of the clusters with the
lowest central entropy. Our results are consistent with the predictions of the
precipitation-driven star formation and AGN feedback model, in which the
radiatively cooling diffuse gas is subject to local thermal instabilities once
the instability parameter $t_{c}/t_{ff}$ falls below ~10, leading to the
condensation and precipitation of cold gas. [Abridged]
