One magnetic field diagnostic for cool stars is coronal X-ray emission. The X-ray emission from late-type stars in open clusters exhibits two kinds of dependences on stellar rotation. Fast rotators show a relatively constant X-ray to bolometric luminosity ratio at a so-called saturation level. Slower rotators show a decline of their X-ray emission with decreasing rotation rate. The physical significance of the transition between these two regimes is a matter of debate.In the past decade, photometric monitoring programs have produced a large number of rotation period measurements in young open clusters. These data indicate that young stars tend to group into two main populations that lie on narrow sequences in diagrams where the measured rotation periods of the members of a stellar cluster are plotted against their (B - V) colours. I report on a correlation between the saturated and non-saturated regimes of X-ray emission and the rotation sequences that have been observed in the M34 open cluster from extensive rotation periods surveys. An interpretation of this correlation in term of magnetic activity evolution in the early stage of evolution on the main sequence is presented.