Rendaku (連濁): why 手紙 is tegami and ときどき is tokidoki
Rendaku, 連濁, is the voicing of the initial consonant of a non-initial element in many Japanese compounds. It is a tendency with restrictions and exceptions, so learn whole-word readings too.

In short
Rendaku, 連濁, is the voicing of the initial consonant of a non-initial element in many Japanese compounds. It is a tendency with restrictions and exceptions, so learn whole-word readings too.
| Components | Compound reading | Shift |
|---|---|---|
| 手 + 紙 | 手紙 | k → g |
| 青 + 空 | 青空 | s → z |
| とき + とき | ときどき | t → d |
| 花 + 火 | 花火 | h → b |
| 本 + 棚 | 本棚 | t → d |
友達から手紙が届きました。
丁寧語 politeA letter arrived from my friend.
本棚に新しい本があります。
丁寧語 politeThere is a new book on the bookshelf.
ときどき公園から花火を見ます。
丁寧語 politeSometimes I watch fireworks from the park.
Why the rule does not apply everywhere
Lyman’s Law (ライマンの法則) blocks rendaku in the usual native-word pattern if the second element already contains a voiced obstruent such as g, z, d or b. The word 風 contains z, so 大風 (a strong wind) and 春風 (spring breeze) keep k. Nasals such as m and n are not the kind of voiced consonant covered by this restriction.
The absence of a voiced obstruent does not guarantee rendaku; lexical history, compound structure and convention matter. It is not simply a change to the second written kanji: the relevant unit is the second spoken element. In listening, watch for dakuten in the kana and listen for the voiced onset; the number of morae does not change. The example 本棚 is a mixed compound: 本 has a Sino-Japanese reading, while 棚 is a native word.