He was the son of Geza I of Hungary and Zsófia (Sophia).
László I wanted Kálmán's brother Álmos to succeed him as King of Hungary. (According to the chronicles, Kálmán may have had a physical deformity, which would have made him unfit to be king per medieval beliefs about such things.) Not wanting to abandon his eldest nephew completely, he wished instead to make him a bishop. Kálmán was accordingly sent abroad to acquire his subsequently famous learning, which earned him the appellation "Könyves", or "Bookish". (At the time, this was not a compliment. History has been kind to Kálmán, however, so modern histories are more apt to translate the nickname as "The Wise" or similar.)
The exact circumstances of how Kálmán acquired the throne after László's death are unknown; among other difficulties, he may have had to get papal dispensation, because ordained clergy could not become king. (The sources are unclear on whether Kálmán was actually ordained. His later laws show that he had no problem with married clergy, so his eventual marriages are no evidence in this matter.)
László died before he could fulfill his promise of leading a Crusade. Kálmán did not find it necessary to fulfill the promise of his predecessor, but did concede at first to let the crusading armies go through Hungary. When the first such army (1096) proceded to pillage its way through the country, he put greater and greater restrictions on subsequent armies, such as taking hostages and mustering his own army to guard the progress. (Needless to say, these actions did not endear him to contemporary chroniclers; that's why we don't know if those descriptions of an ugly, hairy, crosseyed man are true or, um, slightly exaggerated.)
Kálmán changed Hungary's foreign policy: while László I. had asked for the Holy Roman Emperor's help (instead of the pope's) when waging war on Croatia, Kálmán wanted to stay on good terms with the Holy See. This didn't prevent him from subjugating Croatia, nor from conquering Dalmatia ahead of the similarly-inclined Venetians. The pope eventually acceded him the right of appointing bishops.
Kálmán's court was a center of learning and literature. Bishop Hartvik's Life of St. Stephen, a chronicle of Hungary, the shorter of the extant Legends of St. Gellért, and several collections of laws all stem from his reign. One of his most famous laws was half a millennium ahead of its time: De strigis vero quae non sunt, nulla amplius quaestio fiat (As for the matter of witches [more exacly "strigas", which isn't exactly the same as "witch"], there is no such thing, therefore no further investigations or trials are to be held).
Álmos made several attempts to take over Kálmán's throne, but all were unsuccessful. After repeatedly forgiving his wayward brother, Kálmán was finally forced to bring justice against him in 1115, although even then he commuted the familial death sentence required by law to the sentence of blinding Álmos and his young son Béla.
Kálmán died February 3, 1116. He was buried in Székesfehérvár, next to St. Stephen.
He married twice, first to Busila, daughter of Roger I of Sicily, and second to Eufemia, daughter of Vladimir II of Kiev. He had four children: