To "peg someone" means to make a judgment or form an opinion about that person, often categorizing or identifying them in a particular way based on certain traits or behaviors. For example, saying "I pegged him as a messy housekeeper" means you assumed or judged him to be messy based on observation. It is an informal expression used to describe how someone is perceived or identified.
Additionally, "pegging" can also refer to a specific sexual practice, where a woman penetrates a man's anus with a strap-on dildo, but this is a separate and context-specific meaning of the term.
The most common use in everyday language is the judgment or identification meaning.