Soma is one of the most complicated gods of the Hindu pantheon, in part because he takes such disparate forms. At his most basic, he can be viewed simply as a plant. This plant, in turn, may be made into a drink, which is the drink of the gods. Indeed, in many ways it is the drinking of this plant which makes the gods divine. Lastly, Soma is a personified deity, in the same way as Indra or Agni.
The plant which "soma" refers to is uncertain. A number of hypotheses exist. Many believe it represented a psychotropic substance, such as Amanita muscaria or cannabis. Others believe it represented a fruiting plant, such as the pomegranate. Still others believe it was the plant ephedra vulgaris, which was often used in rituals to experience the divine.
A beverage made from soma was drunk as a liquid by many of the gods. It gave them their great abundance of power, and it was through it that many gods were able to accomplish their mighty feats. Both Indra and Agni were known to drink massive amounts of it, with Indra having drunk down rivers of the liquid before his battle with Vritra.
It is also said to have been drunk by mortals to give them some of the powers of the gods. Poets and artists would drink it to find their inspiration, religious men would drink it to better see the gods, and warriors would drink it before going off to battle, to imbue themselves with the might of the divine.
As a god, Soma is said to have appeared as a beautiful bird or a powerful bull. He was sometimes even portrayed as a human embryo. It is rare to find illustrations of him as a human, however, reflecting his somewhat strange place in the Hindu pantheon.
Fairly early on, he began to be associated with the moon. He in many ways supplanted the earlier lunar god Chandra, who drove the moon through the heavens with ten white horses. The moon itself was often looked at as the cup of soma, filled to the brim when full, then drunk down until nothing remained, and slowly replenishing. He is said to have married the twenty-seven daughters of Daksha, the Nakshatras, who were associated with the stars.
One myth about him says that he did not pay sufficient attention to each of his twenty-seven wives. Distraught, they went to their father and complained. Daksha, furious at the slight, laid a curse on Soma that he would die slowly over the course of a month. His wives, not wanting such a vicious punishment, intervened, and so Daksha allowed him to survive the slow withering and reform.
As Hinduism progressed, both the liquid and the god became less and less important in the pantheon. The priests stopped drinking the liquid as a way of worshiping the gods, and instead focused on making sacrifice instead. The secrets of the drink were lost, with some later prayers apologizing for using a substitute, and gradually Soma became simply a lunar god.