One significant difference between the atmospheres of stars and exoplanets is the presence of condensed particles (clouds or hazes) in the atmosphere of the latter. The main goal of this paper is to develop a self-consistent microphysical cloud model for 1D atmospheric codes, which can reproduce some observed properties of Earth, such as the average albedo, surface temperature, and global energy budget. The cloud model is designed to be computationally efficient, simple to implement, and applicable for a wide range of atmospheric parameters for planets in the habitable zone. We use a 1D, cloud-free, radiative-convective, and photochemical equilibrium code originally developed by Kasting, Pavlov, Segura, and collaborators as basis for our cloudy atmosphere model. The cloud model is based on models used by the meteorology community for Earths clouds. The free parameters of the model are the relative humidity and number density of condensation nuclei, and the precipitation efficiency. In a 1D model, the cloud coverage cannot be self-consistently determined, thus we treat it as a free parameter. We apply this model to Earth (aerosol number density 100 cm^-3, relative humidity 77 %, liquid cloud fraction 40 %, and ice cloud fraction 25 %) and find that a precipitation efficiency of 0.8 is needed to reproduce the albedo, average surface temperature and global energy budget of Earth. We perform simulations to determine how the albedo and the climate of a planet is influenced by the free parameters of the cloud model. We find that the planetary climate is most sensitive to changes in the liquid water cloud fraction and precipitation efficiency. The advantage of our cloud model is that the cloud height and the droplet sizes are self-consistently calculated, both of which influence the climate and albedo of exoplanets.