People of a truthseeking bent - rationalists, unbiased scientists, inquisitive non-ideologues - are these types of people likely to be lonelier on average? Those who hold a particular set of positions, tastes, perspectives, worldviews, or preferences to be part of a group, rather than the other way around (being considered part of some group because they hold a particular set of positions) seem like they are at a significant advantage when it comes to the ability to make and keep friends, or at least find tolerant acquaintances compared to the typical truthseeker.
The truthseeker, by virtue of their ability to find, to a particular group they are currently part of or interacting with, uncomfortable truths, seems to put them in the unenviable position of, once they've found a particular uncomfortable truth, having to either keep quiet and have less-than-completely honest or more limited interactions, or speaking their mind and getting ostracized. Along with this, they're far less likely to engage in "false flattery", are more likely to focus on details and nuance (and hence be perceived negatively, due to an aversion to pedantry on certain subjects by some), far more likely to voice disagreement, and far more likely to wind up being a person to defend something considered objectionable by the group (they'd defend the proverbial idiot who says the sun will rise tomorrow - since it will, regardless of the fact that an idiot says it.)
The truthseeker may also confuse their interlocutors, due to what may be perceived as "holding contradictory views" ("how can you think THAT if you also think THIS? You don't know what you're talking about"); they may be accused of being a "plant" from the "other side" ("if you think that particular thing, you must secretly be an X, so all that other stuff you said that I agree with must be a lie"); they may be thought of as a troll or prankster ("you're just saying that thing I consider objectionable to get a negative reaction out of me, but I know you really agree with me on that the way you [honestly] agree with me on all that other stuff"), or that you're playing devil's advocate for its own sake. These things all happen, but due to the (current) inability to know for sure another's motives, it may be easy to confuse the truthseeker with the idiot, the confused/self-contradictory, the plant, the troll, or the advocate, even though the truthseeker's ideas and motives have nothing to do with any of those.
Based on limited observations coupled with a little speculation, I'd say that yes, truthseekers are likely to be lonelier on average. They're likely much rarer, so finding other committed truthseekers would be tough, and there's no guarantee they'd even like each other (for non-truthseeking-related reasons - like not liking the same subjective things (music, fashion, food, etc.)) My personal experience says that one can be professionally and personal well respected, considered extremely friendly, and still have no "real" friends; truthseekers are easy to love, but considered difficult to like.
Perhaps a simpler reason (in the typical case) is that the truthseeker is simply perceived by your typical person as a whole lot less fun.
I certainly agree that it can seem that rationalists are lonelier, I'm just posing an alternate reason why. Though, perhaps your post deserves a more thoughtful reply than I gave.
Unfortunately, the question seems to be a difficult one to answer. First, we need to find a way to determine whether or not rationalists truly are more lonely. Loneliness seems like a tricky variable to quantify. Some ideas that spring to mind: You could measure the size of social circles using social network data or self-report surveys. Simply measure self-reported loneliness. Measure loneliness with some sort of psychological screening like you would measure introvertedness or conscientiousness. Record how often someone goes out with friends. Rationality might be easier to measure, except that I think self-report data would be unreliable, as it seems likely that like intelligence or competence at a given task, rationality would be underrated by those that have it and overrated by those who don't, but I'm sure the folks here at less wrong or elsewhere could write up a survey that measures it fairly well.
Then only once these variables are quantified, would we be able to see if there even is a correlation to begin with. Though it could be explained a number of ways. Rational people are attracted mainly to other rational people, and there are fewer rationalists than non-rationalists. Human social ques are emotionally rather than logically based. Rational people are more likely to be candid about sensitive topics, scaring away non-rationalists. People with psychological traits such as placement on the Asperger's scale or high introversion could be conducive to rationality and not conducive to social aptitude. Or a combination of any of these. it's an interesting topic, but I think we are a long way from being able to draw any big rational conclusions about it yet.