Q: How long do I have to keep my chicken quarantined after treating for an illness or infection?
A: There is not a single answer to that question--it will depend on what your bird has been treated for. For instance, once you've treated for mites and your bird is no longer infested, it's safe to end the quarantine immediately. However, other illnesses like Coryza, even when the bird has recovered s/he may remain symptom-less carrier... a Typhoid Mary for your flock. Other illnesses may fall somewhere in between, with birds remaining infectious for some period of time but not forever.
So when you consult with a veterinarian, make sure to ask this key question about your bird's particular diagnosis. Your vet will be able to tell you when the communicable period is over, and when it's safe to re-introduce a bird who has been ill back to your flock.
Of course, just because your bird is not going to pass illness around doesn't mean you should introduce right away. If your bird doesn't have anything communicable but is still weak--or wounded!--do wait until your bird is well enough to hold his/her own with the rest of your flock. With wounds, you generally want to wait until it is mostly healed up, so the spot doesn't present a target for pecking, which could re-open it.