Tensions/hatreds are much more recent than you might have thought, only about ~120 years, but much more intensely after WWI and WWII.
Serbs and Croats were initially friendly to each other and the Serb and Croat royalty intermarried. Initially, Croats were Catholic and Serbs were divided between Catholics and Orthodox. Orthodoxy was affirmed by Rastko, son the Serbian king, who is also known as St. Sava. Rastko chose to accept Byzantine rather than Roman Christianity and gradually Catholic Serbs switched to Orthodoxy. Serb Catholicism held out longest in Montenegro and southern Bosnia and Dalmatia (e.g. Pag, Dubrovnik, etc.), probably due to Venetian influence. Gradually the Montengrin Serbs became almost entirely Orthodox and the Catholic Serbs in the Dalmatian coast (still under Italian influence) came to consider themselves Croats.
However, religion was not the cause of the initial dislikes: the two main causes were the different treatment of Serbs and Croats in the Austro-Hungarian empire and the Croatian aspirations for independence. Orthodox Serbs in what is today Croatia started coming into the territory mostly in the 16th century. They were refugees from the Turks/Muslims/Albanians from Kosovo/Raska/Bosnia. Having fled to this border region between the Ottoman and Austrian empires, Austria agreed to let them own land if they provided military service and defended the border. The Serbs agree and became soldiers and officers in the Austrian army in a long crescent-shaped border that stretches from the Adriatic, along the western and northern edges of Bosnia into northern Serbia and even Romania. This border region became known as the Militargrenze in German or the Krajina in Serbian. Krajina people were mixed, including Serbs, Croats, Germans, Hungarians, and Romanians, but in the territory of what is modern Croatia, it was predominantly or even overwhelmingly Serb.
Croats outside of Krajina (and the majority of Croats in modern Croatian territory), however, were not given the privileges of the Krajina people. They were serfs of the Hungarian lords, as they had been since around 1000 A.D. They did not own their own land as did the Krajina people. I think this is the first reason why Croats started hating Serbs.
Secondly, Krajina Serbs were generally loyal to the Austrian empire and were greatful for being given refuge from the Turks. Croats in the 1800s became restive against the Hungarians and wished to found a Croatian nation state but Serbs were not interested. Croats generally refused to recognize the existence of a very large Serb minority in Croatia, instead trying to assimilate them as "Orthodox Croats" - something the Serbs definitely resisted. This was a second source of, primarily political, hatred. Ante Starcevic, father of the Croatian nation, who lived in the late 1800s, had a deep hatred of Serbs and his statements are viciously racist and verge on exterminationistic.
During WWI, some Croats were loyal to the Austrian empire whereas others wanted independence. The great powers, however weren't likely to give Croatia independence because they had not ruled themselves since 1000 A.D., when Hungary took power. Additionally, Croatia had generally supported Austria in the empire's war against Serbia in WWI, making it a more Central, rathern than Allied oriented country. Instead, Croatia and Slovenia were incorporated into the Kingdom of Serbs, Croats, and Slovenes under the Serbian king. He was a generally fair ruler but his later successor, the last king, was a dictator. However, the Serbian monarchy was not biased against Croats or Slovenes. It is very likely that if Serbia had not taken in Croatia and Slovenia into the unified kingdom, that these two republics would have remained part of Austria or Hungary, as they had been for almost 1000 years.
Before WWII, Croatian independence movements evolved into the Ustashe movement - a fascist type movement that proclaimed racial and religious superiority over non-Croats in Croatia. The Ustashe were terrorists even before WWII, and assassinated the Yugoslav king in Marseille. In 1941, Germany invaded Yugoslavia on multiple fronts. Slovenia and Croatia warmly welcomed the Germans, meeting them in their finest clothes, and throwing candies and flowers on the invading tanks. Serbia went to war with Germany and Belgrade was bombed on April 6, 1941, when thousands of people were killed.
After Serbia was destroyed, a puppet government was installed. In Croatia, the Ustashe were installed into power, and they started a campaign of genocidal ferocity against Serbs, Jews, and Gypsies in Croatia, Bosnia, and northern Serbia, that even shocked the Germans (not to mention the milder Italians). Jews were generally deported in the German manner, and sent off to Auschwitz or Croatian camps. Serbs were either massacred where they lived in the most gruesome manner (castration, sawing off breasts, decapitation, throat slitting, cutting open the wombs of pregnant women, people thrown alive into limestone caverns and pits, drownings, mutilation (gouging of eyes, etc.)) or sent off to Croatian death camps. Croatia set up 27 death camps, most of which were small concentration camps or transit camps, and a few of which were places of mass death, such as the notorious Jasenovac and Stara Gradiska camps. In Jasenovac and Stara Gradiska, German WWII officials and later Jewish groups such as the Wiesenthal center, estimated that 600,000-750,000 people were exterminated, of which about 30,000 were Gypsies and 30,000 Jews. The vast majority were Orthodox Serbs. The number of Serb civilians massacred in Croatia and Bosnia during WWII by the Ustashe and their collaborators is in the high 100,000s, possibly close to 1,000,000.
The Ustashe were closely aligned and integrated with both the Catholic church and the Muslims of Bosnia. Catholic priests and nuns took part in massacres and forced conversions. Many massacres took place in Orthodox churches, in which Catholic priests and even nuns (when children were being slaughtered) "baptized" the "schismatic" (a derogatory term for Orthodox) Serbs by slitting their throats, smashing their skulls open, or burning them alive. The chief of Jasenovac was a Catholic priest, Miroslav Filipovic-Majstorovic. The Archbishop of Croatia, Aloysius Stepinac, welcomed the Ustashe and Germans in Zagreb Cathedral and did nothing to stop the extermination and forced conversion of non-Catholics. Pope Pius XII was well aware of the genocide. Muslims took part in the massacres also, setting up two SS (Nazi) divisions, the SS Handzar and the SS Kama. The hatred against the Serbs was passionate and pathological, even greater than against the Jews and Gypsies. Serbs were perceived as a people who had betrayed the truth (Catholic) faith, as renegade "Croats" who would not assimilate and consider themselves true Catholic Croats or at least Orthodox Croats, as people who stood in the way of Croatian independence and statehood.
After WWII, the victorious communists portrayed all sides in Yugoslavia as equally guilty in murderous nationalism. The fact of the matter is that the two main Serbian resistance movements, the royalist Chetniks and the communist Partisans, did perpetrate sporadic atrocities against civilians, but usually these were against ideological opponents, e.g. Partisans massacring the families of Chetniks or Chetniks massacring Partisan or Ustashe families. Nothing on the Serb/Macedonian/Slovene side came close to the genocidal extermination perpetrated by the Croat Ustashe and their Bosnian Muslim collaborators. The communists portrayed all as equally guilty and stamped out all discussion of WWII. Jasenovac was turned into a glorified museum with a "stone flower" monument - hardly befitting an extermination camp. The death pits/caverns where countless Serb civilians were hurled were filled with cement to seal the bones away from public view. And school books never mentioned those events. However, Serbs, Croats, and Muslims (but also other ethnic groups) ALL talked about the legacy of WWII, privately at home. Grandparents told grandchildren about atrocities they had survived and seen with their own eyes or escaped, so that Serbs in Croatia and Bosnia were terrified of being ruled by either Croats or Muslims, which brings us to 1990s.
The 1990s war is a whole other story for another forum, but I just wanted to let you know that heavy Croatian dislike of Serbs began around the turn of the 20th century when Croats were trying to achieve independence from Austria-Hungary, but full blown anti-Serbian hatred was brewing in the 1920s and 1930s. In WWII there was the genocide, and only then did the Serbs start really hating the Croats, to the point of wanting to kill them in revenge or at least wanting to have nothing to do with an independent Croatia in 1991.