What it means
ように at the end of a sentence is a set expression for the volitional subjunctive. In layman terms, it means the preceding sentence is a wish!
Why it means that
様{よう} is "a word that expresses the state of things". に is a target particle. Therefore, if it helps you understand, ように means "towards a certain state". So when I say something like
明日{あした}は晴{は}れるように — May it be sunny tomorrow
I'm saying "towards the state of things where it's sunny". As happens frequently in Japanese, I am omitting the verb of this sentence because it is obvious in context.
明日{あした}は晴{は}れるように祈{いの}ります — I pray it may be sunny tomorrow
It expresses a yearning for a particular 様{よう}.
でありますようにactually cannot be used with an explicit verb following it:でありますように願うis ungrammatical. It is as strange as the English counterpart `I wish may it be sunny tomorrow.' – Jan 03 '12 at 21:55verb + ように祈る. In any case, the second sentence is to illustrate the omitted rather than indicate common usage. – Jjed Jan 03 '12 at 22:32晴れるように祈りますis grammatical because晴れるis not polite form. – Jan 03 '12 at 23:20ようにhas turned into a single word that heads a subjunctive clause, and is different fromにmentioned there. – Jan 04 '12 at 12:02wish + ように + wish verbconstructions. From Japanese writers. They are certainly dwarfed bywish + ようにconstructions, but for the sake of illustrating whywish + ようにis used they are useful. – Jjed Jan 04 '12 at 16:44