It's a playful way to describe someone or something that is tiny in comparison to others.
Here's why it works:
* Grasshoppers are small insects.
* Knees are a relatively low point on the body.
Therefore, someone "knee-high to a grasshopper" is literally so short they're almost the same height as a grasshopper. This exaggeration emphasizes their small stature and youthfulness.