What is the underlying chemistry behind the triboelectric effect?
You would've probably heard of the commonly given example, rubbing a glass rod with silk. The glass rod becomes positively charged, and the silk becomes negatively charged.
But why? That's your question I believe, and for that we need to zoom in a little further, until we can see the molecular structure.
Glass, is a polymer mainly composed of silicates. It is a network polymer, with a bunch of $\ce{Si-O}$ groups, as evident in it's structure:

(source: mechanicalengineeringblog.com)
You can observe that some of the oxygens are negatively charged, and are countered by sodium ions.
Now, lets observe silk,
Silk, like most natural fibers, are composed of proteins. These proteins exist as $\alpha$-helices. Sericin is the outermost protein in the silk structure, so I'll show a bit of it's structure,


Now, let's get to the rubbing part!
What happens when you rub them?
You're agitating the two molecules and bringing them in contact. Loose bonds can be broken off. Consider the $\ce{N-H}$ bond in the Sericin structure. It can be easily removed as a $\ce{H+}$ ion, since the resulting negative charge can be shared with the nearby oxygen in the adjacent carbonyl group. This leaves silk with a net negative charge.
This $\ce{H+}$ can now bind to the negatively charged oxygen atoms on glass, giving the glass rod, a postive charge.

I shall end my answer with a note:
Whenever in doubt, look deeper into the structure.