So I recently read the Wikipedia articles of what happened in the FRY and Bosnia. Now without understanding to much it seemed to me that what happened was a bombing of two countries just because they were communists.
I wanna know:
What were the official reasons given for the bombings?
What were the realistic reasons for why the bombings happened?
Thanks in advance.
Correct me if I'm wrong, but I interpret your question as being about two NATO campaigns in the former Yugoslavia:
Firstly, neither campaign took place because of communism - in fact, Bosnia, Republika Srpska, and the FRY were all post-Communist by this point, the Communist Party having lost power across Yugoslavia in 1990.
In Bosnia, the immediate and official reason for the air strikes against Srpska forces were the defence of the remaining "safe areas" held by the Bosnian government but under siege by Srpska forces - Sarajevo, Tuzla, Bihac, and Gorazde (the other two, Srebrenica and Zepa, having fallen in July 1995) - and enforce the exclusion zones around them. Realistically, it was widely acknowledged that the campaign had wider goals, namely to assist Bosnian and Croatian forces in pushing Srpska forces back to approximately 49% of Bosnia's territory (the proportion international mediators had largely settled on by this point for an internal division of Bosnia as part of a peace settlement), from the 60-70% they had previously occupied.
My knowledge of the Kosovo War is somewhat more limited, but the official goal was to compel FRY troops to move out of Kosovo in order to allow peacekeepers to move in, who would ensure the return of refugees. The extent to which there were wider-reaching goals is hotly debated, but generally centre around Washington's growing frustration with, and hostility to, the Milosevic regime in Belgrade (which it had previously viewed as a regional partner, during the wars earlier in the decade), i.e. did they want to cut him down a size?
I realise this may be something of a barebones explanation, but I wanted to address the immediate causes and goals of the bombing campaigns. There's a decent bit of contextual explanation that might be required if you're not familar with the events and conflicts in question, but feel free to ask any specific questions, and I'll try to answer as best I can.
Sources: