This question comes down to the type of DC that is presenting the antigen. e.g., if the DC picks up the antigen in an TH2 milieu and travels to a regional LN then it would drive TH2 differentiation. The cytokines of which- e.g., IL-4 and IL-13 can drive B cell isotype switching to IgE. However, in a bacterial infection, these antigens will activate the DC to present to T cells making TH1 cells and the cytokines of which (e.g, IFNy can drive IgG synthesis from B cells and make opsinizing Abs to clearance of the pathogen). Again these DCs would have a TH1 promoting phenotype in order to influence of the differentiation of the T cell that they are presenting too.
Short answer- the phenotype of the DC (depending on the cytokine milieu in gets the antigen in) determines the subsequent differentiation of the T cell and therefore where or not you make IgE (allergy) or IgG (infection control)