It means he considers she looks better without her hair put up, and he's taken on a condescending way of doing it. His pats essentially state: I don't mean harm, but I don't care what you think of that gesture or this one. And I know the normal way of doing it is merely telling you and letting you make the decision, but what're you gonna do?
So it happened to a friend of yours who's bothered by it? Because in that case you just gotta tell this guy to fuck off. And patting people on the head is patronizing as fuck regardless of the intentions behind it
It means he pulled a rubber band on a girl's ponytail and patted her on the head. Nothing good ever comes from over-analysing simple actions that most likely don't have any meaning deeper than the instant and obvious result of the action.
It means anything from the end of the world to absolutely nothing. Really your reaction to it is more telling, it says, you're a child who reads way too much into simple things done by the opposite sex because of your lack of experience and utter frustration.