Bioflocculants are "biodegradable, safe, and ecofriendly biopolymers secreted by microorganisms" used in water treatment. Their advantages relative to chemical flocculants are reduced toxicity and environmental impact. The only issues are that sometimes these flocculants are relatively expensive, require a co-reagent and easily degrade. For removing bacteria, I would rather use microfiltration.
And synthetic bioflocculants have a large molecular weight, their spatial structure can easily be modified to a specific dispersed system, they are stable.
Also note that bacteria themselves are capable of developing and excreting "bioflocculants" called extracellular polymeric substances (EPS). I refer you to work by Denny Parker and Jose Jimenez on the topic. Certain conditions promote the development of EPS production and associated bioflocculation. This is obviously pertaining to bacteria in suspension.