Our vocal cords create sound by vibrating in the air we exhale. The vocal cords move, making the air molecules vibrate, too. The speed at which the vocal cords vibrate determines the pitch of the sound. Two things determine the speed of vocal cord vibrations: how tightly they are stretched and what type of gas they are vibrating in.
The difference with helium is its density, Vocal cords vibrate faster in gasses, such as helium, that are less dense than air, which is mostly nitrogen. When vocal cords vibrate faster, the pitch of the sound goes up.
Beware: Inhaling helium can be dangerous. If you inhale only helium for an extended time, oxygen in you lungs will be replaced with helium, and you will suffocate. In other words: DON’T TRY THIS.