In what context do we write "Guten Tag" rather than "Sehr geehrte Damen und Herren"?
Formal letters almost always used to start with "Sehr geehrte Damen und Herren," or "Sehr geehrter Herr Maier" if the person is known. However more and more we see formal correspondence that addresses with "Guten Tag," or "Guten Tag Herr Maier". The former may be less fashionable but is there any consent on what occasions we rather not use the one or the other?
The salutation "Guten Tag" in written communication is a more informal variation of "Sehr geehrte/r....".
Both essentially say the same thing, but "Sehr geehrte/r" has been the accepted way to formally address a person for I don't know how many decades.
In my personal experience, "Guten Tag" has gained traction especially in industries that cultivate a more laid-back attitude - Media, parts of IT, and so on - where "Sehr geehrte/r..." is perceived as overly formal. It is becoming more and more popular among younger people (in their 20s, 30s, 40s) in general, no matter what field they work in. I have seen federal employees in their twenties use "Guten Tag" (although it's not the norm).
If in doubt - say, when applying for a position with a German Bank - you can't go wrong with "Sehr geehrte/r".
For everything else, especially if you are on friendly terms with the recipient, "Guten Tag" (or, if you're really familiar with the person, later, "Hallo") is perfectly acceptable.
I would never *write* Guten Tag and have never seen it. (This is not to deny that other people use it, just saying.)
@thei fair enough, but it *is* in the ranks of generally accepted salutations: See e.g. http://din-5008-tipps.de/die-anrede-nach-din-5008
I find "Guten Tag..." a very elegant solution for private, but formal Emails (like asking for support online).
Online support or writing an email to a company as an individual client. My biggest problem with "Sehr geehrter Herr..." is that it is that you have to know the name, and "Sehr geehrte Damen und Herren" feels like you´re holding a public speaking, or writing a B2B letter. I often write "Guten Tag" in my work life, but normally I use "Sehr geehrter", because it is never wrong (even if it can sound a little bit "cold" or official) and because writing "Guten Tag" 5 times a day to the same person feels strange.