While brushing my daughters hair I heard a loud pop from her scalp, why did it make a popping noise? She said it didn't hurt her at all.

Static electricity. Had to be static electricity discharge. If the hair was dry it can build up a charge and that small arc will make a popping sound. There isnt anything else I can think of that would give a pop. The hair is too flexible so had to be a small shock. That is my best explanation.