Space weather has become an international issue due to the catastrophic impact it can have on modern societies. Solar flares are one of the major solar activities that drive space weather. Thus, research is required to yield a better understanding of flare occurrence and enable an accurate flare forecasting. This work introduces novel technologies developed by combining advances in statistical physics, image processing, machine learning, and feature selection algorithms, with advances in solar physics in order to extract valuable knowledge from historical solar data, related to active regions and flares. The aim of this work is to achieve the followings: 1) The design of a new measurement, inspired by the physical Ising model, to estimate the magnetic complexity in active regions and an investigation of this measurement in relation to flares. 2) Determination of the flare prediction capability of active region properties generated by the new active region detection system SMART to enable the design of a new flare prediction system. 3) Determination of the active region properties that are most related to flare occurrence in order to enhance understanding flare occurrence.