Solidarity means to take sides with a group of people who are oppressed and exploited by a power that they are trying to counteract. The starting point for solidarity is that the interest of the addressee is actually shared or at least considered worthy of support.
Solidarity can be theoretical (e.g. in the form of statements of solidarity for workers on strike against a company or messages of solidarity to student assemblies) or practical (in the form of material support to the addressees, by their own work stoppages, etc.).
Is solidarity inherently moral?
If, for example, workers at a company strike for higher pay, they are dependent on support from as broad a base and as much unity as possible in order to asssert their demands. Insofar as workers from other departments of the same company or workers from other companies show solidarity with them, they do this because they share the goal and know that this is a necessity. In this respect, their position is not moral, but rational: wage demands are not a higher value to which they relativize their own goals; and supporting them is also not moral, even if one does not immediately aim at one's own material benefit, but “only” finds the goal worthy of support.
Labor struggles have a catch, however, that has nothing to do with morality: it is an inadequate means, because a) in enforcing their wage demands, the wage dependent workers receive no wages during the strike, b) the means of survival during a strike, the strike fund, can only be filled by giving up wages, which limits the duration of the strike accordingly. Precisely because his wage is not enough for him to live on, he must fight against the one he is dependent on; and exactly for the same reason, a relentless limit is set on his fight in that only by giving up wages, i.e. a worsening of his starting point, is he able to save up the means to endure the fight.
The employer, by contrast, because of his economic means – for him the wage is a means to increase his advance, it is not his existence that depends on it – has the upper hand, and counters strikes with lockouts, thus extorts “wage sacrifices”; so he makes the worker's dependence on wages during a labor dispute his means. With regard to their demands, the strikers are also subject to the calculations of the company: whether and what they are conceded depends first and foremost on its profit calculations.
The labor struggle is thus not a means for wage increases, but it is, at the same time, necessary: wage earners have no other means!  In contrast to the left, which heroizes struggle against oppressors as a commendable task and, by the way, thereby celebrates it as a moral virtue,  it will be soberly noted here that struggle is a grim, tough necessity which is based on the fact that one relies on being able to carry out an opposition with force instead of arguments. This includes losses for oneself.
“Thou shalt always defend the international solidarity of the working class as well as the permanent bonds that unite all socialist countries,” said the Constitution of the German Democratic Republic. What is the difference to the call of the Communist Manifesto: “Workers of all countries, unite!”?
The GDR preached defending the solidarity of the working class as a moral, basically positive attitude to the workers, simply because they are workers. This glorification of the proletarian's existence – in the middle of socialism! – was the result of a wrong criticism of capitalism. It saw capitalism as suppressing the right of the workers to follow their real destiny and denying them a fair share of their work.  By contrast, the slogan of the Communist Manifesto aims at uniting the proles across all national borders in order for them to shake off their condition of dependence on wages by eliminating the relations of production: how much and what work would be necessary should be guided by the concrete benefits for the producers.
As a virtue, solidarity also appears when it is demanded as an imperative in relation to weak, powerless victims, and indeed as such, because they are (this variant is also avowed by politicians). Regardless of the reasons for a predicament, the purposes of the opposition and those of the victims themselves, a partisanship is called for, only because – like, for example, in solidarity with the Palestinians – they are the victims of the Israeli state. In addition, criticism of the reasons for the predicament is confused with a partisanship for the aggrieved persons. Criticism of Israel's war against the Palestinians, which it wages to assert itself as a regional power, does not include embracing the Palestinian party: their leaders – for them it is also, like any nation, about a distinction between those who wield the (aimed at) state power and its people – calculate with their human material in principle no differently than Israel, because it also about their state power and asserting themselves as a nation, even if from a completely different starting position.
It is self-evident that solidarity would be superfluous in a rational society: its basis – the plight of being subjected to and struggling against a hostile superior power – would be abolished.
 This paradox only shows that the antagonism between wage laborers and capital cannot be abolished by labor struggles. The necessity to get the income necessary for survival as a wage laborer is constantly preserved with the antagonism, insofar as the attack on the wage is included in the purpose of the profit seeker for which the wage is granted.
 The interest for which they urge the struggle is elevated here into a higher interest (progress in the history of humanity, “objective interests of the people,” etc.), so the struggle is interpreted as a service to the (fictive) general public.
 So the extortion opened by the capitalist relations of production, of having to work for the wealth of others, was found nevertheless useful and taken into service as a source of wealth, only now no longer for the benefit of private owners.