We studied the global characteristics of dust emission in a large sample of emission-line star-forming galaxies. The sample consists of two subsamples. One subsample (SDSS sample) includes ~4000 compact star-forming galaxies from the SDSS, which were also detected in all four bands at 3.4, 4.6, 12, and 22 mum of the WISE all-sky survey. The second subsample (Herschel sample) is a sample of 28 compact star-forming galaxies observed with Herschel in the FIR range. Data of the Herschel sample were supplemented by the photometric data from the Spitzer observations, GALEX, SDSS, WISE, 2MASS, NVSS, and FIRST surveys, as well as optical and Spitzer spectra and data in sub-mm and radio ranges. It is found that warm dust luminosities of galaxies from the SDSS sample and cold and warm dust luminosities of galaxies from the Herschel sample are strongly correlated with Hbeta luminosities, which implies that one of the main sources of dust heating in star-forming galaxies is ionising UV radiation of young stars. Using the relation between warm and cold dust masses for estimating the total dust mass in star-forming galaxies with an accuracy better than ~0.5 dex is proposed. On the other hand, it is shown for both samples that dust temperatures do not depend on the metallicities. The dust-to-neutral gas mass ratio strongly declines with decreasing metallicity, similar to that found in other studies of local emission-line galaxies, high-redshift GRB hosts, and DLAs. On the other hand, the dust-to-ionised gas mass ratio is about one hundred times as high implying that most of dust is located in the neutral gas. It is found that thermal free-free emission of ionised gas in compact star-forming galaxies might be responsible for the sub-mm emission excess. This effect is stronger in galaxies with lower metallicities and is also positively affected by an increased star-formation rate.