The beginning of the breakup of the former Yugoslavia aligned with the fall of the Berlin wall and the shift of Eastern European countries towards the West. Yugoslavia was a federal communist state, and Serbia was one the federal republics within Yugoslavia. As the other republic sought to pursue independence they turned towards the West. Serbia, headed by Milosevic, a former communist, did not pursue the pro-Western policy. Instead Milosevic was establishing his own authoritarian type of rule.
This set the context for the US and Western foreign policy, which did not view Serbia aligned with the Western interests. As the wars started sanctions were imposed on Serbia. There were crimes committed by the Serbian side in Bosnia and Croatia, but unlike what's been inaccurately mentioned in the other responses, Serbia was not found guilty of these crimes, but rather Serbs from Bosnia and Croatia were found guilty of war crimes. Bosnia even sued Serbia for genocide in the International Court of Justice but lost the case.
With the wars in Croatia and Bosnia over in 1995 Milosevic still continued to rule in Serbia. However, another conflict was starting in 1998, with the Albanian population in the Serbian province of Kosovo also seeking independence. The conflict could mostly be compared to the Israeli-Palestinian conflict, with Serbia facing the same challenge as Israel. Even though Serbia's response towards the Albanians was much milder than the Israeli response towards Israel, the West took a different approach in the case of Serbia. With Serbia not politically aligned with the West, the approach that the West took was to bomb Serbia, which eventually lead to NATO taking over Kosovo. Also, it is worth mentioning that prominent US politicians at the time such as Bob Dole, Joe Biden and Eliot Engel lobbied for the Albanian cause throughout the 90s.
When Kosovo declared independence in 2008 it was done so unilaterally, without the Security Council approval thus circumventing the international law. Why the US decided to recognize Kosovo is most likely for political and security reasons. Thus most countries shown in the map above have some sort of political and/or security arrangements and/or dependence on the US. There are some exceptions, such as Greece and Spain.
Most countries that do not recognize Kosovo, are less dependent on the US. Some have their own issues which are similar to the issue of Kosovo, and some do not have the incentive to recognize Kosovo and circumvent the international law. Thus, the issue of Kosovo remains the stalemate between the US and countries reliant on the US, and countries that are capable of pursuing more independent policies.