We review basic ideas behind state-of-the-art techniques for first-principles theoretical simulations of the phase stabilities and properties of alloys. We concentrate on methods that allow for an efficient treatment of compositional and thermal disorder effects. In particular, we present novel approach to evaluate free energy for strongly anharmonic systems. Theoretical tools are then employed in studies of two materials systems relevant for nuclear energy applications: Fe-Cr and Zr-based alloys. In particular, we investigate the effect of hydrostatic pressure and multicomponent alloying on the mixing enthalpy of Fe-Cr alloys, and show that in the ferromagnetic state both of them reduce the alloy stability at low Cr concentration. For Zr-Nb alloys, we demonstrate how microscopic parameters calculated from first-principles can be used in higher-level models.