When it's dirty, preferably when the lights are on so you can see what your doing.
Don't think preserving the biome is a concern when cleaning the sandbed. You want to clean the nasty out, the critters that live in the sandbed will repopulate.
Never really noticed much in my "cleaned" sand water other then a few bristle worms, and the occasional peanut, or medusa worm, and possibly some pods. Nothign that won't repopulate in a few days.