Stotra is a genre of religious poetry intended to be sung or melodically recited. Closely associated with Hindu devotional practice, it also appears in Jainism and Buddhism. Its emphasis is on the poetic text: a stotra may praise a deity, offer a prayer, describe a subject or take the form of a conversation.
Forms and lengths vary widely. Many stotras use a recurring line or phrase at the end of each verse, while name-listing hymns form a distinct group called nama-stotras. Some texts express personal devotion; others incorporate spiritual or philosophical ideas.
Sources: Wikipedia, Rate Your Music, MusicBrainz
The earliest stotras are described as Vedic, particularly associated with the Samaveda. Stotras as a whole are generally post-Vedic and vary considerably in form and content.
Stotras became part of a range of religious texts and rituals. They can appear within larger works, including epics, Puranas and Tantras. A prominent form is the nama-stotra, which lists names of a deity; a sahasranama is a name-listing hymn of a thousand names.
Although stotras are associated with Sanskrit poetry, they have also been composed in other languages. Appar composed a Tamil stotra dedicated to Ardhanarishvara that forms part of the fourth volume of the Thirumurai.
Choose a devotional subject and shape it as poetry. You could address a deity in praise or prayer, describe a sacred subject, or build the text as a conversation. A stotra can be personally devotional or include spiritual and philosophical ideas.
One option is the shloka metre: verses of four lines, each with eight syllables. You could also end successive verses with the same line or phrase. For a nama-stotra, organize the text as a list of names of a deity rather than relying on a recurring refrain.
Write a melody that lets the words remain central and can be sung or melodically recited. As a practical approach, you could give each verse a related melodic shape and return to a recognizable setting for the repeated line, if your text has one.