In Ramayana, Bali and Sugriv were two brothers, but for what reason they become enemy to each other?
The story is described in Kishkindha Kanda of the Ramayana. Vali, who was king of the Vanara kingdom of Kishkindha, once went into a cave to fight the demon Mayavi, while his brother Sugriva waited for a year for him to come out of the cave. Finally Sugriva saw blood gushing out of he cave, and thinking it was Vali's, he sealed the cave with a rock to prevent the demon from escaping. He then returned to Kishkindha, where he was crowned king, as he thought that Vali was dead. Here is how Sugriva describes the incident to Rama:
That demon speedily entered an un-enterable cavity under the ground, covered with grass, and we too having reached there speedily stood at the aperture of that cavity for a while. Then Vali has gone into the enfoldment of fury on observing the entry of that demon into the hole, whereby his senses felt outraged, and he said this sentence to me. Then Vali said to me, "Now you stay here on the alert, Sugreeva, at the entrance of this hole till I return on destroying the enemy in a fight on my entering this hole..." On hearing those words I requested him to allow me too to come in to the hole, but he being the great tormentor of his enemies disallowed it, and he made me to swear on his feet and entered that hole. Well over a year is over after his entering into that cleavage, and to me too who stayed at the entrance of the cleavage that much time had passed away. I thought I lost him for my brother is unseen, and in all fondness towards him my mind started to doubt about some harm might have befallen on him. After a long time blood with foam gushed out that hole, and on seeing it I was deeply saddened. Sounds of screaming demon came to my ear, but the screeches of my brother who is involved in fight are unheard, in the least. Oh, friend, Rama... I have surmised and concluded in mind by the indications that my brother is finished, and covered the cavity's opening with a mountain similar boulder, and performed water oblations to my deceased brother with saddening pain, and then returned to Kishkindha. But the ministers have persuaded and heard from me the actual happening though I was concealing it. Then duly summoned by all of those ministers I was crowned[.]
But then as it turned out, Vali was alive the whole time; it was Mayavi's blood that had gushed out of the cave. So Vali returned to Kishkindha accused Sugriva of intentionally sealing the cave and usurping Vali's throne. Here is what Vali says:
You all are aware that earlier the gigantic and rancorous demon Maayaavi invited me desiring a duel in that night. On hearing his call for a duel I went out of the royal palace, and this very hazardous brother of mine quickly followed me. And that formidable demon Maayaavi ran away as he was fraught with fear on seeing me with a second one at my side, and he speedily entered a great cavity of earth on seeing us two nearly reaching him. On knowing the demon's entry into that great precarious cavity, I said to this one, this cruel looking brother of mine. My power will not let me return from here to the capital without killing that demon, hence you wait at this cavity's entrance, till I kill that demon and come out of the cavity. Believing that he stayed at the entrance of the cavity I entered that impenetrable cavity, and then in searching for that demon there one year elapsed. I have seen that terrified enemy of mine effortlessly, and I killed him immediately along with all of his relatives. That cavity has become impassable, since it is fully filled with the gushes of blood emanaing from the mouth of that demon who fell yelling onto ground. On my killing that invading enemy easily, I could not see any exit from that cavity as its mouth was closed. Wherefore I did not get a reply though I repeatedly shouted, 'Sugreeva, oh, Sugreeva.' thereby I was very saddened. With my foot I pounded and smashed that lidded hilltop, and from there I exited that way and arrived here. As such this cruel fantasist of kingdom trammelled me in there forgetting the clannishness.
And so Vali, disregarding Sugriva's explanation of what happened, banished Sugriva and stole Sugriva's wife. And so Sugriva went to the Rishyamukha mountain, which is the one place Vali could not kill him because the sage Matanga had cursed Vali that he would turn to stone if he ever went to the Rishyamukha mountain. It's on the Rishyamukha mountain that Rama and Lakshmana found Sugriva. And then Rama helped Vali defeat Sugriva, leading to Sugriva once again becoming king of the Vanaras.
A tale of two brothers – Bali and Sugriva (The Ramayana)
Once, Bali chased a demon Mayavi after killing his brother Dundabhi. Mayavi entered into a cave where Bali followed him. Bali too followed him into the cave. But before entering he cave, he instructed Sugriva to wait outside for a fortnight. He also said that if he did not come out of the cave after fifteen days, Sugriva would understand that Bali had been killed. After a month, He saw blood coming out of the cave and assumed that Bali was dead. Sugriva returned to the kingdom as a king. But Bali was alive. When he came back and saw Sugriva running the kingdom of Pampapuri,he became furious. He drove Sugriva out and enslaved his wife as well. Sugriva was hiding in Rishiyamooka mountain, because of curse of Sage Matang, this place was safe.
This is the crux of what and why it happened, the incident that made brothers enemies. You can read more facts here