Um.. How to explain.. I don't think it has anything to do with being polite, but to my knowledge it is used in two ways:
- To write words with changing pitches
- To write onomatopoeias, in a gentle way
1 is pretty obvious I think, like for example the Chinese way of pronouncing the a word with a high-low-high pitch (like "hao" in "ni-hao") may be written with a "~" when written in Japanese hiragana. I couldn't think of any "real" Japanese example though. It is often used in manga when someone's singing, that's for sure.
With regard to 2, let's take a hug as an example, of which the sound can be written is expressed as "むぎゅ". It can be lengthened with a "ー", then it becomes "むぎゅー", which is kind of hard, rough hug. You know, when you missed someone for ages. On the other hand, with a "~", it becomes "むぎゅ~", which sounds more friendly, gentle and soft.
Same with "しーん", the "sound of silence". "しーん"is a really cold silence, but "し~ん" is a silence with some kind of ambiguity.. I know, it sounds vague but I don't know how to express it differently..
And about pronunciation.. It is pretty much the same, it's just that the words with "ー" are harder than "~".