The ubiquity of star-forming dwarf galaxies (SFDG) in the local Universe allows us to trace their evolution in all type of environments, from voids to rich clusters. SFDGs in low-density regions are still assembling their mass, they often show peculiar gas morphology and kinematics, likely associated to external gas accretion or galaxy interactions, and they can experience strong bursts of star formation. The most metal-poor SFDGs are found in the field and they are unique laboratories to investigate the star formation process in the low-metallicity regime, at conditions similar to their high-redshift analogues. On the other hand, SFDGs in intermediate- and high-density environments provide a key to understand the processes that remove their interstellar medium (ISM) and suppress star formation, leading to the different types of gas-poor early-type dwarfs. We review the most recent results on the properties of SFDGs at low and high galaxy densities focusing in particular on the impact of a cluster environment on their ISM components (dust, molecular, atomic and ionised gas). We analyse the population of SFDGs in the nearest rich clusters: Virgo, which is still in the process of assembly, and Fornax, which is more dynamically evolved, more compact and denser. We discuss how the different evolutionary stage of the two structures affects the properties of SFDGs.