When modeling and interpreting the spectral energy distributions (SEDs) of galaxies, the simple stellar population (SSP) model, star formation history (SFH) and dust attenuation law (DAL) are three of the most important components. However, each of them carries significant uncertainties which have seriously limited our ability to reliably recover the physical properties of galaxies from the analysis of their SEDs. In this paper, we present a Bayesian framework to deal with these uncertain components simultaneously. Based on the Bayesian evidence, a quantitative implement of the principle of Occam's razor, the method allows a more objective and quantitative discrimination among the different assumptions about these uncertain components. With a Ks-selected sample of 5467 lowredshift (mostly with z 1) galaxies in the COSMOS/UltraVISTA field and classified into passively evolving galaxies (PEGs) and star-forming galaxies (SFGs) with UVJ diagram, we present a Bayesian discrimination of a set of 16 SSP models from five research groups (BC03 and CB07, M05, GALEV, Yunnan-II, BPASS V2.0), five forms of SFH (Burst, Constant, Exp-dec, Exp-inc, Delayed-τ ), and four kinds of DAL (Calzetti law, MW, LMC, SMC). We show that the results obtained with the method are either obvious or understandable in the context of galaxy physics. We conclude that the Bayesian model comparison method, especially that for a sample of galaxies, is very useful for discriminating the different assumptions in the SED modeling of galaxies. The new version of the BayeSED code, which is used in this work, is publicly available at https://bitbucket.org/hanyk/bayesed/.