The short answer
In Puranic stories, the moon god Chandra has 27 wives. They are the 27 daughters of Daksha, a lord of creation in the Puranas, and they represent the 27 nakshatras, the lunar mansions used in Hindu astronomy.
Who Chandra is
Chandra is the god of the moon. Later texts often identify him with Soma, a name that also appears in the Vedas for a sacred plant, drink and deity.
The 27 wives are the nakshatras
A nakshatra is one of 27 divisions of the sky that the moon passes through over about 27 days, so the moon spends roughly one day in each. Some lists add a 28th, Abhijit, so the count is sometimes given as 28.
The story of Rohini and the curse
In a widely told version, Chandra favors one of his wives, Rohini, above the rest. The other wives feel neglected and complain to their father, Daksha. Daksha then curses Chandra, and the moon begins to fade.
Accounts differ on the details of the curse. In one version, Chandra turns to Shiva, whose help eases the curse but does not end it completely. The moon’s cycle of waxing and waning is then explained as the result.
Why the story is still told
The story offers a way to explain two things: the moon’s phases and the nakshatra system. The hindu panchang calendar tracks the moon through the same nakshatras, and each day’s nakshatra is part of how the calendar is read.
Reading the story
Details such as the mother of the daughters and the exact form of the curse vary between texts. Many readers treat the story as a symbolic account of the moon’s cycle and the nakshatras, rather than as a record of a real marriage.