Gibbs free energy (G) is a function of the temperature and pressure of a system as well as the number of molecules of each chemical species (this has to do with the way G is defined). Therefore, the G is useful for reactions occurring at constant temperature and pressure, because the change in G will reflect only free energy released/absorbed by the reaction you want to study.
There are other definitions of free energy that are useful in other situations. For example, the Helmhotz free energy depends on the volume of the system and is therefore useful for reactions that occur under conditions of fixed volume.