Hyphens are used in compound words to make their structure clearer; they are mainly used in very long words and are never mandatory. So “televidaparato” and “televid-aparato” mean the same (but normally you would use the shorter “televidilo”).
Whether two roots form a compound word or each have their own function in a phrase is a question of grammatical structure.
- “ĉiun nokton” is like the English “every night.” “ĉiun” does not change the semantics of “nokton” (a night is still a night) but tells how many nights are concerned (all). “somernokto” would be a special kind of night (summer night); “
somer nokto” would be ungrammatical since somer does not have a correct ending. But you could say “somera nokto,” making it an adjective in its own right.
- “ĉiunokto” seems a strange word; I have never met it before but maybe it could be interpreted as “a night like every night” (an ordinary night).
- “ĉiunokte” is an adverb derived from the expression (and meaning the same as) “en ĉiu nokto.” You could say the the adverb ending “-e” replaces the preposition “en.” Mathematically it is like (ĉiu nokto)-e but we cannot use parentheses in Esperanto (how would we pronounce them?), so instead we merge the two roots “ĉiu” and “nokt” to indicate that the adverb ending refers to both as a unit. “
ĉiu nokte” would be ungrammatical and considered wrong.