As Tamar Kadari writes,
The Rabbis learned many important halakhot of prayer from Hannah’s entreaty at Shiloh and her prayer became a model of prayer that God answers.
The main source is the Babylonian Talmud, 31A-B
R. Hamnuna said: How many most important laws can be learnt from these verses relating to Hannah! Now Hannah, she spoke in her heart: from this we learn that one who prays must direct his heart. Only her lips moved: from this we learn that he who prays must frame the words distinctly with his lips. But her voice could not be heard: from this, it is forbidden to raise one's voice in the Tefillah. Therefore Eli thought she had been drunken: from this, that a drunken person is forbidden to say the Tefillah. And Eli said unto her, How long wilt thou be drunken, etc. R. Eleazar said: From this we learn that one who sees in his neighbour something unseemly must reprove him......She said to him: Thou art no lord, [meaning] the Shechinah and the holy spirit is not with you in that you take the harsher and not the more lenient view of my conduct. Dost thou not know that I am a woman of sorrowful spirit: I have drunk neither wine nor strong drink. R. Eleazar said: From this we learn that one who is suspected wrongfully must clear himself. Count not thy handmaid for a daughter of Belial; a man who says the Tefillah when drunk is like one who serves idols...Then Eli answered and said, Go in Peace. R. Eleazar said: From this we learn that one who suspects his neighbour of a fault which he has not committed must beg his pardon; nay more, he must bless him, as it says, And the God of Israel grant thy petition.
What has always bothered me is that what is known as "Hannah's Prayer", and is printed for distribution here at Tel Shiloh, is really not the prayer for a son but that of thanksgiving for the son.
The first 'prayer', at I Samuel 1:11, is described there simply as a vow:
And she vowed a vow, and said:'O LORD of hosts, if Thou wilt indeed look on the affliction of Thy handmaid, and remember me, and not forget Thy handmaid, but wilt give unto Thy handmaid a man-child, then I will give him unto the LORD all the days of his life, and there shall no razor come upon his head.'
The 'prayer' there is basically 'remember me', 'forget not' and 'give me a son'.
But the text of what is presented as the 'prayer' - and hundreds of barren women, those with difficulties entering into pregnancy or relatives and friends of the same, recite a different text, that of I Samuel 2:1-10 - is not truly a beseeching prayer. It is a prayer of thanks.
By that as it may, I have now found a new translation of William Whitt of the relevant passages found here.
^