Yama is the deathgod. Even before the gods took up their divine mantles and back when they were still just the crew and technicians of the starship, they still called him "deathgod". It was his nickname, from his obsession with capturing one of every species that roamed the new planet and vivissecting it. Yama died very young in an engine accident and was reincarnated (at the chronological age of a teenager) in a very old body, which probably had some effect on him. Yama is the most brilliant man on the planet, who designed most of the gods' technological marvels, and is capable of feats of science most others would consider impossible. He is also the greatest swordsman, having spent multiple lifetimes in the study of the blade. Yama cannot be killed, because he is death itself. Yama's gaze can sap the will to live and life-force from a person.
Basically, the plot of Lord of Light is that the gods are evil and oppressing the people. They have purged the opposition party (who they dub "accelerationists", for wanting to accelerate the technology of the people to the same level the gods have - the gods claim it's in the peoples best interest to be stuck in the dark ages), all except for one man, Sam. Sam uses the doctrines of Buddhism to lead a revolution against the gods, and they send Yama to stop him - which he eventually does. Sam manages to escape the gods' clutches, though, and later Yama joins his revolution, not for sympathy with his cause, but to get revenge against the heavenly politics that cost him his marriage to Kali.