When being tested in the spectrometer why is it vital that the atoms in the same sample are given the same electrical charge e.g all are c+1 or all are +2 etc
This is a misconception that during ionization, each ion must get a +1 or +2 charge. It is desirable to have +1 so m/z corresponds to the molecular mass of the ion or its fragment. The state of ionization heavily depends on what you are using to ionize your target analyte. For example if you use electron impact, you will see fragments mostly with +1 charge. However in other techniques called matrix assisted laser desorption (MALDI), the state charge can be as high as +12 and so on. They are detected as such. In electrospray ionization, +2 is also common.
There is no way a mass spectrometer "knows" a priori the state of charge of an ion. All charge ratios are detected. However it can distinguish the sign. It depends on the user whether negative or positively charged ions reach the detector. Some ions are better detected in positive mode and some in negative mode.
In mass spectrometry, the position of each peak you observe depends on the value m/z (i.e. mass over charge). If you have only z=1, then the position will depend only on the mass (m/1 = m).(1)
In a mass spectrometer, you will generate a mixture of charges at first but ions with a charge greater than 1 are filtered out.
(1) Obviously, it also works with a -1 charge.