While I wouldn't say that they understand each other per se (this is Charlie Brown we're talking about, after all), they definitely are written for each other. It's been talked about before and I think there's a screencap floating around that goes into their dynamic a bit more, but Peppermint Patty loves Chuck because, despite his numerous faults, he's comfortable with his position in the world and who he is, unlike her. She really looks up to him and even puts him on a pedestal equal to her father. This comparison (pic related) is not an accident by Schulz. Peppermint Patty herself can't explain why she loves him ("I can strike him out in 3 straight pitches!") but this is the generally accepted gist.
For Chuck's part, and unfortunately for Patty, he responds to very physical, comforting affection to lift him up akin to that of a mother. It's just Patty's luck that she never had a mother to help her get in touch with that feminine affection Chuck so desperately desires. Patty's inability to be up front and direct with him also has to do with her self-confidence and self image, and once again unfortunately for Patty Charlie is the only boy in the world who just cant respond to a hint.
It's honestly a very tragic relationship that will only change when either the two changes their inherent nature.
Beyond that, its obvious much of Peppermint Patty's personality and characteristics were thought of with Charlie in the back of Schulz's head.