Most antibiotics are quite safe during breastfeeding, even though small amounts may be secreted in the Breast Milk.
The only potential side effect in infants whose mothers are breast-feeding and taking antibiotics such as penicillins, cephalosporins, macrolides, and aminoglycosides are changes in their intestinal flora (bacteria that are normally present in the intestines). This may lead to loose stool and diarrhea in the infant, but these side effects are temporary.
You have to be careful only for a couple of antibiotics (which your doctor is anyways unlikely to prescribe) during breastfeeding.
Flagyl / Metronidazole is excreted in large quantities in breast milk and may lead to loose stools/ fungal infection in infants and is hence better avoided, or the milk discarded for 24 hours after a course of this medicine.
Chloramphenicol is a rarely prescribed antibiotic that CANNOT be taken during breast feeding, since it can lead to bone marrow suppression & serious liver damage. The good news is that this antibiotic is in any case very rarely prescribed nowadays.
For more information about antibiotic and other medicine safety during breast feeding read here