When is $\Delta U=nC_{v}\Delta T$ true? 
Given that $1$ g of water in liquid phase has volume $1$ cm$^3$ and in vapour phase $1671$ cm$^3$ at atmospheric pressure and the heat of vaporisation of water $2256$ $\frac{J}{g}$; the change in the internal energy in Joules for $1$ g of water at $373$ K when it changes from liquid phase to
vapor phase at the same temperature is:

The solution given for the question is:
\begin{align*}
\Delta Q       &= \Delta U +  \Delta W   \\
2256 \text{ J} &= \Delta U + P\Delta V   \\
2256 \text{ J} &= \Delta U + 10^{5}(1670\cdot10^{-6}) \text{ J} \\
\Delta U       &= 2089 \text{ J}
\end{align*}
I understand the solution that is given but I am confused as to why I can't simply just write $\Delta U=nC_{v}\Delta T$ and hence write $\Delta U=0$, since temperature remains constant?
 A: Internal energy is a category that encompasses thermal energy, elastic energy, bonding energy and other phase-related energy as well as other chemical energies etc.
Of all these, temperature is only a measure of internal thermal energy. The formula you show with heat capacity only accounts for the added heat energy that is converted into thermal energy (a temperature increase).* In order for the added thermal energy amount to equal the change in internal energy, we must be able to neglect all the other kinds of inertal energy types.
We can't neglect them all in your case.

*

*In particular, since a phase change happens we have a huge absorption of heat energy that doesn't result in a temperature increase because that energy instead is used for the phase transition (typically called latent heat).


*Also, as the solution shows, we have to take into account the work energy that is spent for this phase change to be able to happen. Meaning, for the gas to form it must expand and "push away" the surrounding air. It must do work on the surroundings. Some energy is thus spent on doing that, and this energy delivered to the surroundings and thus removed from the internal energy.
All in all, these two energy contributions (one positive, one negative) play a role in the final internal energy that is stored in the substance. And none of them change the amount of thermal energy so we see no temperature change.

* With this I am referring to the thermal energy change within the substance that absorbs the energy. If you instead use the formula to calculate the thermal energy change within another substance which is supplying the energy, then you have calculated the amount of heat energy that is transferred from the supplier to the absorber - but we can't know from that whether the absorber converts this absorbed into an equivalent thermal energy change or to other types of non-thermal energies.
A: I belive you want to write $n c_v$ or just $C_v$. The following is a general relation
$$\left.\frac{\partial U}{\partial T} \right\vert_{V} = C_v \text{.}$$
If you want to compute $\Delta U$, in general, you can integrate both sides:
$$\Delta U = \int_{T_i}^{T_f} C_v\,dT \text{.}$$
If $C_v \neq C_v(T)$, you get your formula
$$\Delta U = C_v \Delta T \text{.}$$
So what's wrong in this case?
In phase transitions, temperature is constant. Heat is ''used'' to make the phase transition itself (Latent Heat). Taking your exercise as example: you have $1 \text{g}$ of water in liquid phase. All the heat comming in to that gram of water will make it transition to gas phase until you reach the amount of $Q = 2256 \text{ J}$ (according to the exercise), when there will be no more water in liquid phase.
So, in phase transitions $C_v$ (or any heat capacity $C_{\chi}$) is not defined since for every $\delta Q$ the rise of the temperature is $0$. In other words, in that regime, you would need an infinite amount of heat to rise the temperature, meaning $C_v \to \infty$.
A: For a single phase, internal energy is a function of temperature (and sometimes specific volume or pressure).  But, if a change of phase is involved, the internal energy changes discontinuously.  For example, for heating of a liquid to the vaporization temperature followed by vaporization, one would have $$\Delta U=nC_v\Delta T+n{\Delta U}_{vaporization}$$
Incidentally, the heat of vaporization is equal to the change in enthalpy in going from one mole of the saturate liquid to one mole of the saturated vapor at the given temperature.  So the correct equation that should have been used is $$\Delta H=\Delta U+\Delta (PV)=\Delta U+P\Delta V$$
