It will depend upon all the facts and circumstances at the material time. The way you describe it, one might think that the warning given is 'frivilous and vexatious' - but that's probably what you want me to think.
Your friend has been given a written warning - was she given a previous warning resulting in a lesser verbal warning? It wouldn't make the employers action any more or any less justifiable if so, but again, and I stress, it all depends on all the facts and circumstances at the relevant time.
To me, 'humming' seems perfectly innocuous and not worthy of a mention far less any knd of warning. But, if what was being 'hummed' was in itself offensive by it's nature, (perhaps sectarian or racist), or done to deliberatley to distract and upset colleagues, and that the behaviour was previously brought to your friend's attention, then the employer would have a strong case.
As for it affecting your friend's concentration? Your employer would have to show that it actually has affected her concentration - demonstrated by errors or general standard of work being done - or possibly, errors of other colleagues distracted by the 'humming'.