The story of Sandhya & her marriage with Vasishta – Shiva Purana
This is the story of Sandhya i.e., dawn and dusk. The upper half of her body became the Prataḥ Sandhya (dawn) and the lower half of her body became the Shyaṃ Sandhya (dusk). Before the sunrise, when the day breaks, the period is called Prataḥ Sandhya (dawn). It delights the Gods. When the sun has set and assumed the hue of a red lotus, the period of Shyaṃ Sandhya (dusk) sets in. It is delightful to the manes.
A beautiful woman was born of the mind of Brahma. She was variously called Sandhya, Divakṣanta, Sayaṃ Sandhya and Jayantika, she was very beautiful with finely shaped eyebrows capable of captivating the minds of even sages. Sandhya performed a penance on the mountain Candrbhaga, cast off her body and was reborn as Arundhati, the daughter of the excellent sage Medhatithi.
Arundhati performed sacred rites as guided by Vasishta, the mental son of Brahma. Vasishta advised her to meditate silently on Shiva, the sole first cause of all the worlds with the mantra ““Oṃ Namaḥ Saṃkaraya Oṃ”. Vasishta advised her to take only water in the first and second Ṣaṣṭakalas (a period of 4 hrs.) and to observe complete fast [without even taking water] in third Sastakala. The rites were to be performed at the end of each Ṣaṣṭakala. Sandhya worshipped Shiva with the mantra and performed penance as per procedure explained by Vasishta.
A period of four Yugas elapsed during which she continued her great penance with mind fixed and duly concentrated on Shiva. Propitiated by her penance Shiva was greatly delighted. He revealed Himself to her within and without as well as in the heaven. Shiva became visible to her in the form in which she was meditating upon him. She rejoiced much on seeing in front of her, the lord Shiva with face beaming with delight, in the same form as she was meditating on. As she remained with eyes shut, Shiva entered her heart and blessed her with divine wisdom, divine speech, and divine eyes. She thus acquired divine wisdom, divine eyes, and divine speech. Directly perceiving the lord of Durga, she eulogized the lord Shiva.
Sandhya said: --
When Shiva vanished after granting her the boons, Sandhya too went to the place where Medhatithi was performing sacrifice. She entered the sacrificial hall without being observed by anyone. Meditating on that Brahmachari Vasishta, her tutor in the mode of austerities, Sandhya thought of him as her future husband, and entered the blazing sacrificial fire unobserved by the sages.
The god of fire sent forth her body to the pure zone of the sun. The sun severed her body into two halves and placed the same on his own chariot for the propitiation of the Pitṛs and the Devas. The upper half of her body became the Prataḥ Sandhya (dawn) and the lower half of her body became the Shyaṃ Sandhya (dusk). Before the sunrise, when the day breaks, the period is called Prataḥ Sandhya. It delights the Gods. When the sun has set and assumed the hue of a red lotus, the period of Shyaṃ Sandhya sets in. It is delightful to the manes.
At the end of the sacrifice, the sage found his daughter in the sacrificial pit shining lustrously like heated gold. With very great delight the sage took up the daughter, as though she were a sacrificial article. He bathed her and kept her on his lap. The great sage gave her the name Arundhati. Surrounded by his disciples he celebrated the event joyously. The word Arundhati means “one who does not hinder sacred rites in any manner whatsoever”. She acquired this name which later became well-known in the three worlds.
The divine lady grew up in the hermitage, Tapasaraṇya, on the banks of the river—Candrabhaga. When she reached her fifth year, the chaste lady sanctified the environs of the Tapasaraṇya and the river Candrabhaga, by virtue of her good qualities. Brahma, Vishnu and Shiva got her marriage celebrated with Vasiṣṭha, the son of Brahma. She secured Vasiṣṭha and bore the auspicious sons Shakti etc.
Reference: Shiva purana, Rudra-saṃhita, Sati Khanda, Chapter 5, 6 & 7