Penicillin is a really common drug suitable for lots of conditions. I wouldn't automatically assume that my child is allergic but I wouldn't give it for the first time without medical supervision. It is worth getting another drug for the moment (to get rid of the chest infection) and then seeing if your doctor would give a controlled small amount of penicillin at a later date to see if your child does have an allergy.