We always told DD that when she thought she was ready we would let her get her ears pierced. We let her know that there would be a small pinch when it was done but, after that, it wouldn't hurt.
One day, when she was 5, she told me that she was ready. I asked her if she was sure and she said yes so off we went. She squeezed my hand during the first one and, when it was done, said "Was that all?". I guess she'd built it up in her mind to be much more painful than it was.
So...my opinion is that whenever the child is ready it's fine.