I'm wrapping up my year post-M2.
Half of it comes down to how your school/curriculum is structured. My school highly encouraged it after M2 because we have a nontraditional M3/M4 schedule that makes it very difficult to enter outside institutions at the right time.
The other half just comes down to preference.
Doing it post M2 will give you plenty of time to apply your preclinical knowledge in the laboratory setting. Drawback is a small but significant amount of programs may require a Step 2 score. Look into this. It's also a nice stopping point that doesn't disrupt your education much by forgetting stuff.
Doing it post M3 will allow application of clinical knowledge. You will also enter your research year knowing full well how you did on clinicals and therefore how much you need to compensate with research. Your connections with others will also be more recent. Drawbacks are you may lose some clinical knowledge before M4, which may be harmful for Sub I performance if you're not careful.
I really liked doing it post-M2. I really needed a break after Step 1 and had a rough time in my personal life the past 3 years, so this gave me time to cope with that. I feel rejuvenated and ready to enter clinicals. I was also working in a lab that applied my preclinical knowledge in a meaningful way.