Mechanical work performed on a working fluid causes a change in the mechanical constraints of the system; in other words, for work to occur, the volume must be altered.  Hence, volume is an important parameter in characterizing many thermodynamic processes where an exchange of energy in the form of work is involved.
Volume is one of a pair of conjugate variables, the other being pressure.  As with all conjugate pairs, the product is a form of energy.  The product  is the energy lost to a system due to mechanical work.  This product is one term which makes up enthalpy :
where  is the internal energy of the system.
The second law of thermodynamics describes constraints on the amount of useful work which can be extracted from a thermodynamic system. In thermodynamic systems where the temperature and volume are held constant, the measure of "useful" work attainable is the Helmholtz free energy; and in systems where the volume is not held constant, the measure of useful work attainable is the Gibbs free energy.
Similarly, the appropriate value of heat capacity to use in a given process depends on whether the process produces a change in volume. The heat capacity is a function of the amount of heat added to a system.  In the case of a constant-volume process, all the heat affects the internal energy of the system (i.e., there is no pV-work, and all the heat affects the temperature). However, in a process without a constant volume, the heat addition affects both the internal energy and the work (i.e., the enthalpy); thus the temperature changes by a different amount than in the constant-volume case and a different heat capacity value is required.