Well, some “philosophers say” this. Others say other things. Solitude is really a lot more complicated than this basically religious view. It suggests that if someone struggles with being alone, they aren’t yet evolved enough, or haven’t been able to see the transcendental beauty of aloneness, or are getting distracted by earthly mundane things.
Solitude is justifiably celebrated at times, but it’s also the basis of one of our worst punishments, solitary confinement. Those who celebrate it usually define things like that out of consideration (along with loneliness, exile, shunning, isolation, and loads of other things that look like solitude but can’t easily be given a transcendental spin).
So sure, solitude can be good. I take long walks every day, alone, and it’s good. It’s also an indication of a certain level of privilege I have – I have a safe place I can walk, I don’t have to try to gear up to home-school kids every day, etc. Not everyone has that privilege – are they not as evolved if they have a harder time seeing solitude in this situation?
I don’t want to suggest that solitude can’t have the effects claimed for it. Sure it can. So can community. It might, in fact, be a peculiarly Western idea that we reach true individuality by being alone – many societies in Africa operate against a backdrop of something like Ubuntu, which is a communal frame of reference. It doesn’t mean that they don’t have individuality there, but that they recognize that we humans are nothing without the connections we have with others. Solitude might give those connections focus, or it might withdraw from them. We might discover ourselves or lose ourselves in our own thoughts, unable to tell the difference between reality and our own fantasies without the checks and balances of other people.
Anyway, I’m always a bit leery when someone tells us what “philosophers say”, even beyond the overgeneralization. Philosophers are more likely to start asking hard questions about something that functions as a truism of the virtuous life. This is certainly one of those.