According to Etymonline, "choleric" derives from from Greek kholera "a type of disease characterized by diarrhea, supposedly caused by bile" with bile being "khole", so called for its color, greenish-yellow. From 1580s comes the meaning of "easily angered, hot-tempered" and "pertaining to cholera" from 1834. But why was yellow bile associated with anger?
We do not really know. The association comes from ancient medicine of humors, black bile, yellow bile, phlegm, and blood, four supposed bodily fluids. Considering that "phlegm" does not exist and black and yellow bile are the same substance in modern view it is hard to say why semi-fictional "fluids" were associated with observed phenomena, perhaps they were postulated just for the purpose of explaining them. Indeed, it is not the fluid associations that were the rational kernel of humoric explanations, but rather the interrelations between various ailments that they were used to express.
The doctrine of four humors can be traced back to Ancient Egypt and Mesopotamia, but it took its classical form in Greece around 400 BC and was canonized by Hippocrates of Kos. Greeks associated the four humors to four elements (earth, water, air and fire). In Roman times Galen (129–201 AD) further related them to four temperaments (melancholic, phlegmatic, sanguinic and choleric). The yellow bile was associated with fire, which explains its later relation to the "fiery" choleric temperament, and, in excess, to anger, see Wikipedia's History of Humorism.
A Swedish physician Fahraeus speculated that the idea of humors came from observing blood clotting. His speculation would explain why the lightest "fluid" (yellow bile) was associated with the lightest element (fire), but it is not entirely convincing. Here is from Hart's Descriptions of Blood and Blood Disorders before the Advent of Laboratory Studies:
"Fahraeus (1921), a Swedish physician who devised the erythrocyte sedimentation rate, suggested that the four humours were based upon the observation of blood clotting in a transparent container. Following the clotting of the homogeneous red fluid, it separates into a dark red/black clot at the bottom with a thin layer of red cells above it. Above this is a pale green or whitish layer and the contents are surrounded by clear yellow serum. Certainly, clotted blood reveals the humours of blood and yellow bile, but the appearance of black bile and phlegm is not so apparent."