What I do totally depends on the number of kits I have, and my future plans for them.
Sometimes I'd leave a litter with the mother until processing. This works best for lower numbers of very fast weight gainers. The dam has to agree to this too, and not all will.
Unfortunately, I can't use this method with my current buns, because of a tendency towards larger litters and slower weight gain.
Doelings that I intend to keep are usually left with their dams until I decide I want another litter. No specific reason, other than a vague hope that there is some benefit towards socialization.
(I dream of colony buns, though I fear that goal is far off.)
So for normal weaning (which I do somewhere in the 6-9 week range) I either place the kits in another cage or else separate them by gender in two separate cages. Mostly depending on how many kits of each gender I have, and how many empty cages are available to me.
After I process a litter, I usually give replacement stock their own cages, or pair them up for another month or two. My harlis are good natured enough to have company for everyone except active brood does and mature bucks.
Recently, I left a junior buck in the growout pens just because he was super easygoing. He did a fine job as "babysitter" to the early-weaned litter, and was processed along with them.
If older kits are sharing cages, keep an eye on them to make sure they are getting along. Pulled fur (from mounting) is the most obvious sign of sexual maturity, and a great indicator for when they need their own cages.
As you can see, they can adapt to a variety of situations.
My personal guidelines are:
1, It's a good idea to remove kits from a caged doe before another litter arrives, as a doe may become territorial to the new kits. Also, the older kits may disturb a nest of newborns.
2, It's a good idea to remove bucklings by 12 weeks to prevent rebreeding.
3, I do not single out kits into individual cages until they have reached 8 weeks, as I feel they are healthier and happier with their litter mates.