Story of Hanuman and Suvarchala is found in the Puranas. Hanuman married Suvarchala ritualistically to learn all the nine scriptures. Legend has it that Surya, the guru of Hanuman, could not teach his student all the nine scriptures as one of the scripture could only be taught to a married person. This scripture was associates with Grammar.
Hanuman was Bal Brahmachari –celibate. To solve the problem, Surya cut of his rays and created a female Goddess named Suvarchala. The Goddess was also a celibate.
The two were married ritualistically by Surya, the sun god. Thereafter, Surya imparted training Grammar to Hanuman.
Please note that this story is not part of Ramayana. It is believed to have been part of a book on Hanuman composed by Sage Parashara.