A night shift is either a group of workers who work during the night, or the period in which they work.
A night shift can be a group of workers who work during the night. It can also be the time that they work.