Vali and Sugriva were brothers. Here is one story of their birth:
Beautiful apsaras sang and danced in the court of Indra, god of rain and storms.
The charioteer of Surya, the sun-god, was Aruna. He longed to see the apsaras, so he disguised himself as a woman: Aruni.
Indra was surprised to see a face in the crowd he didn't recognize. "She is beautiful," Indra thought to himself. "I desire her."
So Indra seduced Aruni in that female form, and she gave birth to a child: Vali.
Surya also slept with Aruni in female form; their child was Sugriva.
Inspired by: Sita: An Illustrated Retelling of the Ramayana by Devdutt Pattanaik
Notes: This story is on p. 154 of the book. In other versions of the story, Vali and Sugriva was the children of Ahalya, born when the gods Indra and Surya seduce her. See Ahalya's Children. Pattanaik notes that in the Adhyatma Ramayana, the monkey-king Riskha become a woman after seeing himself in a magical pond, and then Surya and Indra fall in love with him, so he has two children: Sugriva and Vali.