Well, I don't think they are related, as some previous posters have also said.
It has more to do with personality, whether they introverted or extroverted. Then of course there are other factors that help or make the situation worse (what is valued at school, how the other children are, is the child happy and settled, does he feel valued or ignored, bullied, etc).
My able DS1 is very sociable, makes friends very easily, seems to know how to fit in from the go, likes football, tag, ball games, and also likes the geeky things like science fiction, fantasy, etc (mainly from DH and I). I'm always in awe at how socially capable he is, as I was (and still am) the opposite. I'm an introverted, was very able at school but struggled to make meaningful connections and friendships. It took me a long time to develop those skills, and the best friends I made I met them much later as an adult.