Thai people pray to King Rama V, Chulalongkorn, because he was considered to be a Buddha, and a very famous and popular buddha at that. It should be noted for those unfamiliar with buddhism that this is "a Buddha," as in someone who has reached enlightenment, not "the Buddha," as in Sidhartha Guatama Buddha. To some degree, Rama V could be compared to a Catholic Saint.
The real question you are asking, I think, is "why is King Rama V a very famous and popular Buddha?"
The answer requires a bit of an understanding of history. King Rama V's reign lasted from the 1870s until 1910. During that time Europe was busy colonizing the world. The French had control of Vietnam, Laos, and Cambodia while the British had control of India and Burma. In effect, Thailand (then Siam) was surrounded by European Colonialists vying for control of this "available" land while King Rama V was desperately trying to keep control of his country.
King Rama V did a few fantastic things in order to keep the British and the French out of his country. He played the two off of each other using some brilliant diplomatic maneuvering, he ceeded each some land to keep them happy, and he instituted sweeping reforms and modernizations in order to convince the Europeans he led a modern country that did not need what the Europeans would call a "civilizing influence."
These reforms and modernizations included building a modern military training ground and sending himself and his princes to Europe to learn about democracy and constitutional monachies. He also transformed the country from a network of city-states to a single state, abolished slavery, and built a railroad system facilitating trade, communication, and central government control.
It is a source of pride to many Thais that Thailand was never colonized while all of their neighbors were. Chulalongkorn was the mastermind of this protection. He kept the foreigners out while acting as the father of a modern nation and maintaining enlightenment as a Buddha.
That is why people pray to Chulalongkorn.