During the past years remarkable progress has been made in the development of optical and electronic devices based on the group-III nitrides. Using their alloys one can in principle obtain a material with a bandgap from 0.7 eV (InN) to 6.2 eV (AlN) with an intermediary value 3.44 eV (GaN). But it is impossible to make an alloy of group-III nitrides with any composition due to large miscibility regions. Thermodynamics of bulk and biaxially strained AlGaN, GaInN and AlInN alloys was investigated in "delta lattice parameter" (DLP) model. Calculated values of critical thickness for the films grown on GaN substrate agree well with the experimental data and Helmholtz mixing energy is calculated. Obtained T-x phase diagrams show critical temperature Tc=107K and its lowering under biaxial strain for AlGaN, which means the stability of these alloys. For GaInN Tc=1344K. At growth temperatures T=1000K the alloy is fully miscible only up to 5% composition of InN but it is metastable up to 20% of InN. Biaxial strain in thin films broadens the metastable region up to 76% of InN. For AlInN calculated critical temperature is Tc=1450K and it doesn't lowers under biaxial strain. At T=1000K the miscibility gap is 16%< x(In)<70% and becomes smaller under biaxial strain. Valence charge density distributions were calculated using model pseudopotential method in 32-atom supercells approach to take into account internal deformations, compositional disorder and structure relaxation. This allowed to understand the processes which take place during alloy formation. Stability of the solid solution is determined by two main factors: destabilizing charge redistribution under strain due to lattice mismatch of pure binary compounds and stabilizing charge transfer from less ionic bond to more ionic due to compositional disorder. Biaxial strain strongly affects the deformation induced charge redistribution, while it doesn't have effect on chemical charge transfer, thus stabilizing the system.