It is important to realise that religion is presented as a vital force in both of these texts. However, there is a distinct difference in the way in which each text presents religion and how it relates to the characters in the text.
Firstly, Medea presents its central character as revolting against the way in which religious norms and standards have been violated to leave her in terribly compromised position. Because of her husband's marriage to the daughter of the King of Corinth, Medea finds herself an outcast. She therefore feels no desire to adhere to religious norms and values that have been violated by her husband.
In "The Rime of the Ancient Mariner," religion is presented as something which is a powerful, elemental force that will result in punishment if any of its laws are transressed. It is the Mariner's inability to see beauty in nature and his thoughtless killing of the albatross that therefore results in his own punishment. Let us remember the moral of this tale as expressed towards the end of the poem:
He prayeth best, who loveth best
All things both great and small;
For the dear God who loveth us,
He made and loveth all.
The didactic element of this tale involves us realising that we are all made as beautiful creatures by God. Our thoughts and actions should therefore reflect this realisation.