Context. To gain insight on the mass assembly and place constraints on the star formation history (SFH) of Lyman break galaxies (LBGs), it is important to accurately determine their properties. Aims. We estimate how nebular emission and different SFHs affect parameter estimation of LBGs.Methods. We present a homogeneous, detailed analysis of the spectral energy distribution (SED) of ∼1700 LBGs from the GOODS-MUSIC catalogue with deep multi-wavelength photometry from the U band to 8 μm to determine stellar mass, age, dust attenuation, and star formation rate. Using our SED fitting tool, which takes into account nebular emission, we explore a wide parameter space. We also explore a set of different star formation histories. Results. Nebular emission is found to significantly affect the determination of the physical parameters for the majority of z ∼ 3−6 LBGs. We identify two populations of galaxies by determining the importance of the contribution of emission lines to broadband fluxes. We find that ∼65% of LBGs show detectable signs of emission lines, whereas ∼35% show weak or no emission lines. This distribution is found over the entire redshift range. We interpret these groups as actively star-forming and more quiescent LBGs, respectively. We find that it is necessary to considerer SED fits with very young ages (<50 Myr) to reproduce some colours affected by strong emission lines. Other arguments favouring episodic star formation and relatively short star formation timescales are also discussed. Considering nebular emission generally leads to a younger age, lower stellar mass, higher dust attenuation, higher star formation rate, and a large scatter in the SFR-M relation. Our analysis yields a trend of increasing specific star formation rate with redshift, as predicted by recent galaxy evolution models. Conclusions. The physical parameters of approximately two thirds of high redshift galaxies are significantly modified when we account for nebular emission. The SED models, which include nebular emission shed new light on the properties of LBGs with numerous important implications.