When is $\Delta U=nC_V \Delta T$ true? I am confused about the equation from thermodynamics $\Delta U=nC_V \Delta T$. I am reading the notes of my professor.
In one instance, he derives the adiabatic expansion law, which states for an isentropic transformation (reversible and adiabatic) of an ideal gas, we have that $PV^{\gamma}$ is constant. He uses the fact that $dU=nC_VdT$, even though the volume of the gas is of course not constant during such a transformation.
In another instance, he calculates the efficiency of a diesel cycle, which uses two isentropic transformations, an isobaric, and an isochoric transformation. He calculates the heat for the isochoric transformation as $Q=\Delta U=nC_V\Delta T$ and for the isobaric transformation as $Q=\Delta U=nC_P\Delta T$. 
So are we or are we not allowed to say $dU=nC_VdT$ holds in general? Or does it only hold when the volume of the gas remains constant?
 A: $\Delta U=nC_v\Delta T$, is only applicable for ideal gases.
Specific Heat at constant volume i defined as the quantity of heat required to raise the temperature of one mole by $1\text K$,
$$C_v=\frac{\Delta U}{n\Delta T}\tag1$$
This relation is independent of the process that the ideal gas goes through. This follows from the fact that for an ideal gas,w hose particles do not interact which each other, internal energy only depends on the kinetic energy of the particles. Potential internal energy for an ideal gas is $0$.
The only parameter that can change the internal energy of the gas in the kinetic energy of the constituent particles and the only parameter that can change kinetic energy of the particles1 is temperature.  Therefore, Internal energy is a function of temperature.
Additional info -
From kinetic theory of gases,  Kinetic energy of the particles of an ideal gas only depend on temperature.
For one mole monoatomic  ideal gas,   $KE=\frac{3}{2}RT$.
From the law of equipartition of energy, the energy associated with each molecule of the system per degree's of freedom of the system is $\frac{1}{2}kT$. For a gas with $f$ degrees of freedom,
$$\text{Total energy associated with each molecule} = \frac{f}{2}kT$$
($k$ is the Boltzmann's constant, $k=\frac{R}{N_a}$).
Similarly,
$$\text{Total energy associated with } n \text{ mole} = \frac{nf}{2}RT$$
Since potential energy of the particles of the system is $0$, The kinetic energy of n mole gas, having $f$ degrees of freedom can  be given by,
$$KE=\frac{nf}{2}RT$$
An infinitesimal change in KE will bring an infinitesimal change in internal energy (as stated above),
$dU=dKE$
$dKE=nC_v dt$,
$C_v= \frac{dKE}{dT}$,
$C_v=\frac{nf}{2}R$
Putting this into equation $(1)$,
$$\Delta U=n\frac{f}{2}R \Delta T$ $\tag 2$$
The above relation is more general than the relation tagged $(1)$,
All this calculation assumes no interaction between the particles of the gas, but real gases do interact with each other ,i.e, For real gases potential energy is not $0$.
I hope this adds something to your intuition about internal energy.
Check this out : $\Delta U$at constant temperature , What is the meaning of internal Energy?  .
A: Like any other differential quantity, it holds as long as it holds. I know that sounds circular, but what I mean is that as long as $nC_V$ is constant with respect to temperature, you'll get $\Delta U = nC_V \Delta T$. The form that relies on infinitesimal quantities, $\operatorname{d}U = nC_V \operatorname{d}T$, is the definition of $C_V$, so it always applies… Well, it applies as long as $C_V$ is understood to be the heat capacity when all extensive quantities other than internal energy are held constant, not just volume.

He uses the fact that $dU=nCVdT$, even though the volume of the gas is of course not constant during such a transformation.

What's going on here is $U$ is what is known as a state function. What that means is that the the internal energy $U$ only depends on the state of the system, and not the path taken between the two points. Because of this, you can calculate $\Delta U$ by choosing a path that is convenient for calculation; for example an isometric (constant volume) process followed by an isobaric process (constant pressure). Calculations of heat exchanged or work done along this different path will be wrong, because heat and work are not state functions, but the internal energy change will be the same.
A: First, $\Delta U = nC_v \Delta T$ is valid for any situation, as long as we're dealing with ideal gases.
Second, the equation you wrote: $Q = \Delta U$ (for an isobaric process) is incorrect.
Here's why:
(in context of an isobaric process only!)
We know that,
$$Q = \Delta U + W$$ [0] 
and, 
 $$\Delta U = nC_v \Delta T$$ 
and The ideal gas law,
 $$\Delta (PV) = \Delta (nRT)$$
Differential form under constant volume[1]:
$$ P dV = nR dT$$
But, $$W= PdV$$
Substituting [1], $$W=nRdT$$
Place the values of $\Delta U$ and $W$ into the first equation [0]:
$$Q = nC_V \Delta T + nR \Delta T$$
$$Q = n \Delta T(C_V + R)$$  Now remember that for an ideal gas: $C_P = C_V + R$ 
Hence
$$Q = nC_P \Delta T$$
