Durkheim reframed looking at religious practices as primarily about social cohesion, rather than sets of statements or cosmologies. So that's sociology. Kuhn pretty much attempts a sociology of the history of science.
Sapolsky makes good points about the persistency of OCD & schizo experiences, and the possible social benefits of functional cases of these in religious practice. Dawkins has been criticised (eg by Bret Weinstein in a debate with) for refusing to consider how behaviours that even if they began as a parasitic meme-complex likely must have adapted towards symbiosis, given the example of celibate priests for instance given authority by speaking from an 'unworldly' position. This area rapidly gets in evolutionary-psychology, a field widely considered so tainted by bad science & crackpots, that it's rare professional scientists will have anything to do with it.
Game-theory is increasingly looked to for understanding and predicting morality, and especially distrubutions of human attitudes, such as stable cross-cultural frequencies of psychopathy (it is useful for surgeons, may be useful for CEOs but harm their businesses, but crucially just be too useful in crisis situations like war to be discarded evolutionarily).
Kahneman looks at how we develop different strategies of decision-making for where we have more or less time/energy, which he applies to economics but has implications for the philosophical understanding of rationality (he also co-introduced the term cognitive-bias, which I applied to understanding our intuitions about the nature of causation here: Is the idea of a causal chain physical (or even scientific)?). The recognition and deconstruction of 'homo economicus', the unjustified and unjustifiable assumption that humans are independent rational agents, has similar importance.
Jonathan Haidt looks as an anthropologist at the evolution of morality in 'The Pragmatic Validity of Moral Pluralism'. His moral foundations theory looks to broad differences between pastoral and agrarian cultures to understand the morality of rightwing and leftwing communities, and that Europe may have flourished by having an unusual degree of mixing of these.
It is hard not to psychologise when trying to understand unusual individuals who have had particularly striking personal impacts on philosophy, like Nietzsche or Wittgenstein. I find the contrast in formative experiences between Hobbes and Rousseau, and their different projections of 'human nature' to understand politics, illuminating.
In summary, there's definitely an appeal to use tools to look at trends or take-up of philosophical ideas. Sometimes we can understand things like morality and rationality better. But should be wary of the temptation of a totalising 'psychohistory' approach. Individuals can have far too much impact, even though it is very rare for anyone to have a major impact that can't be fitted into broader trends & historical context. The historical materialism of Hegel & Marx, should be cautionary tale enough of what a dead-end it can be to think that is enough to explain all developments.