I posed the question back in 2013, and thought I'd re-up the late John Gardner's interesting answer at that time (and invite reader thoughts/reactions):
Digression: Fortunately the UK Research Excellence Framework, while it laboriously measures the extra-academic 'impact' of research, doesn't require that that impact be for the better. If one's research happened to be a constant inspiration to blood-sucking alien life-forms intent on enslaving humanity (not true of mine, but clearly true of some in my immediate vicinity) that would still qualify as an impact so long as the aliens took the trouble to record their debt to one's research. In fact, correctly documented and corroborated, that would be a top-ranking research impact in the REF, as it would have great 'significance' (apocalyptic) and 'reach' (intergalactic).
Back to main line of thought: If I reflect, as I occasionally do, on whether I could be putting my brain to better use, I console myself with the thought of how little any of my standard comparators ever contributes instrumentally, at least in net terms, to making the world a better place. Lawyers and politicians and religious leaders and journalists and NGO people all like to think that what they do has good consequences for humanity, but I doubt whether most of them are (in the round) doing much more good than ill by their work. And I doubt whether any instrumental good they do, in the round, is particularly closely related to whatever good they may have intended to do. So their example does not encourage me to change my intentions in a more instrumentally do-gooding direction. (Although maybe there is constitutive good in their acting on good intentions.)
Signed comments (full name, valid e-mail address [which will not appear]) strongly preferred.