Exploiting recent developments in generalized Born (GB) electrostatics theory, we have reformulated the calculation of the self-electrostatic solvation energy to account for the influence of biological membranes. Consistent with continuum Poisson-Boltzmann (PB) electrostatics, the membrane is approximated as an solvent-inaccessible infinite planar low-dielectric slab. The present membrane GB model closely reproduces the PB electrostatic solvation energy profile across the membrane. The nonpolar contribution to the solvation energy is taken to be proportional to the solvent-exposed surface area (SA) with a phenomenological surface tension coefficient. The proposed membrane GB/SA model requires minor modifications of the pre-existing GB model and appears to be quite efficient. By combining this implicit model for the solvent/bilayer environment with advanced computational sampling methods, like replica-exchange molecular dynamics, we are able to fold and assemble helical membrane peptides. We examine the reliability of this model and approach by applications to three membrane peptides: melittin from bee venom, the transmembrane domain of the M2 protein from Influenza A (M2-TMP), and the transmembrane domain of glycophorin A (GpA). In the context of these proteins, we explore the role of biological membranes (represented as a low-dielectric medium) in affecting the conformational changes in melittin, the tilt of transmembrane peptides with respect to the membrane normal (M2-TMP), helix-to-helix interactions in membranes (GpA), and the prediction of the configuration of transmembrane helical bundles (GpA). The present method is found to perform well in each of these cases and is anticipated to be useful in the study of folding and assembly of membrane proteins as well as in structure refinement and modeling of membrane proteins where a limited number of experimental observables are available.