I had to learn some Akkadian for a senior paper in Ancient Religions about 30 years ago. The topic was some discussion of grammatical similarities between the Hebrew text of Genesis and the Enuma Elish---one of the most important Akkadian texts, and an interesting source for studies of the early cultural origins of the monotheistic religions.
Sometimes you have clues from poetry (and discussions of poetry) or song.
In addition to other comments: sometimes you are lucky, as when someone figured out that Copts speak ancient Egyptian. It was also a semitic language like Arabic.
Of course none of this can be "authoritative" in a substantive sense: not only must Arabic pronunciation have influenced Copt, but you need only look at contemporary time to see how accents etc can vary widely in short geographical distances much less over time. These variations extend to contemporaneous usage of dead languages: I learnt Latin pronunciation in school which apparently is different from usage in the USA, so I can't even make Latin puns with certain people!
So in the end it's just a general idea and a consistent usage so scholars can communicate with each other.
IANAL, but if the language family, period spoken and geography of a given ancient language is known, then there are many cues to suggest a pronunciation, if the language familys history is well documented. And sometimes you find documents that have cues about correct (and incorrect) pronunciation in the language itself (ancient greek has many such text, for example). One may also get cues from the pronunciation of the modern language in the ancient area of the language of which he is trying to discover phonetics.
Much of the decipherment of Ancient Egyptian hieroglyphics was due to the discovery and the analysis of the Rosetta Stone. An accurate translation was made by Jean-François Champollion in 1822.
We still don't know what ancient Egyptian actually sounded like, because they didn't write vowels. Egyptologists basically invented a transliteration with rules for vowels:
I always wonder if this "no one wrote down vowels" thing was really because these languages were spoken without vowels. The insertion could just be projection of the current situation onto the past. I mean like a language consisting of words like this one:
I always wonder if this "no one wrote down vowels" thing was really because these languages were spoken without vowels.
The issue with your theory is the numerous counterexamples of languages from the same region which did not (and in fact still do not in plenty of cases) include vowel indicators in their writing systems, but nonetheless spoke and still speak the vowels.
Also, Egyptian is known to have included "determinative" hieroglyphs for cases where the reading would otherwise be ambiguous; the determinative allowed words with the same consonant structure but different vowels to be distinguished from each other (though the determinative itself did not encode a vowel; instead it indicated what type or category of thing the preceding word was, which allowed the reader to choose the correct option).
Plus your example of a vowel-less word is from a language which does have vowels:
A lot of Afro-Asiatic languages like Arabic and Semitic also have the "write no vowels" pattern. That being said, there are other Afro-Asiatic languages like Berber that have those long consonant strings. I am not too familiar with these languages, but I wonder if there is some schwa epenthesis happening in those clusters.
Pictographs are difficult, and I'm not sure how pronunciation is sussed out since even modern, living languages have diverging pronunciations in pictographic written languages.
For morpheme based languages (i.e., where the letters make sounds, and then the collective sounds hold meaning), pronunciation can be backtrace by looking at the shifts of child languages. For instance, a lot of english T words had shifted from D words (e.g., 'dens' from french/latin for tooth, to english 'tooth'; many words experienced a d->t shift). When you compare this to other child languages who experienced other shifts, you can sort of triangulate back to the original pronunciation based on how the child languages ended up.
It's sort of like genetics, in a way: if you have two children, one with blonde hair and the other with brown hair, you can infer that one parent had to be blonde.
E: One more analogy since it came to me: Imagine you see a few people walking in different directions, and you want to know where they all started from. You can look at where they are, try to group them in to similar types ('cognates', which words do we think came from the same word), and then look at the path they seem to have been walking down. Then, you draw a line back from where they are, through the path they came from, and hope that the lines you draw for all of them intersect at some point, and that point is your source.
E2: Explaining pronunciation through text is hard.
Unfortunately the way genetics works with hair colour you can't infer from a child's hair colour the parent's hair colour, especially that of a blonde haired child.
With enough children you can. It's an imperfect analogy since in genetics there are two parents, but if there are 4 or 5 children, then you can make inferences as to the probably hair color of a parent.
If you have enough offspring you can infer the likely allele distribution in the parents, but not from two children. If you could it would make genetics so much easier to study.
There are many branches of Indo-european languages. Backtracing to Proto-Indo-European thankfully has many branches -- the problem is in finding the right cognates.
There's a very readable and entertaining book (in Swedish at least, don't know if it's available in English) called "i döda språks sällskap" that talks about the history of accadian, sumerian, hettite etc; highly recommended if you can find+read it. The author used to blog in English at http://necrolinguist.blogspot.no/
Ola Wikander? Drought, Death, and the Sun in Ugarit and Ancient Israel: A Philological and Comparative Study seems to be his only work in English. Is that it?
It's useful for a writing system to have a glyph for "zadmin" -- when you want to write about a zip-compressed administrator interface, it really saves time.