Context. Inverse problems are of great importance in astrophysics, e.g., for deriving information about the physical characteristics of hot optically thin plasma sources from their extreme ultraviolet and X-ray spectra. Aims. We describe and test an iterative method developed within the framework of a probabilistic approach to the spectral inverse problem for determining the thermal structures of the emitting plasma. We also demonstrate applications of this method to both high resolution line spectra and broadband imaging data. Methods. Our so-called Bayesian iterative method (BIM) is an iterative procedure based on Bayes' theorem and is used to reconstruct differential emission measure (DEM) distributions. Results. To demonstrate the abilities of the BIM, we performed various numerical tests and model simulations establishing its robustness and usefulness. We then applied the BIM to observable data for several active regions (AR) previously analyzed with other DEM diagnostic techniques: both SUMER/SOHO (Landi & Feldman 2008, ApJ, 672, 674) and SPIRIT/CORONAS-F (Shestov et al. 2010, Astron. Lett., 36, 44) line spectra data, and XRT/Hinode (Reale et al. 2009, ApJ, 698, 756) broadband imaging data. The BIM calculations confirmed the main results for SUMER/SOHO data showing very good quantitative agreement between both DEMs at log T ≈ 6.5 (T is the temperature in units of Kelvin) and a slight shift for two maxima at lower temperatures with ≈30−50% difference in the DEM values for the coolest peak. For the SPIRIT data, we revised and validated AR DEM results including the inference of hot plasma in ARs with an emission measure (EM) at temperatures ≈9−15 MK comparable to the EM at ≈2−4 MK. In the case of XRT broadband data, the BIM solutions provided evidence of hot plasma at temperatures ≈4−6 MK with EM up to ∼30% as compared to that at ≈2−4 MK in a non-flaring AR on 2006 November 12.Conclusions. The BIM results show that this method is an effective tool for determining the thermal structure of emitting plasma and can be successfully used for the DEM analysis of both line spectra and broadband imaging data. The BIM calculations correlate with recent studies confirming the existence of hot plasma in solar ARs. The BIM results also indicate that the coronal plasma may have the continuous distributions predicted by the nanoflare paradigm.