The internal energy of a gas/system is a state process.
i.e. the change in internal energy is independent of the path taken between two states. It only depends on the final and initial states.
For a cyclic process the initial and final states are the same. Hence the change in internal energy is 0.