Games frequently incorporate dialogue, discoverable text, instructions, clues, jokes, voiceover and many other elements which involve writing. While writing sometimes falls to the game designer, often larger projects hire in a specialist to work on the text as a freelancer, or in some cases have writers on staff full time. Large roleplaying game projects in particular frequently need permanent writers (sometimes called narrative designers).
The history of game writing and game writers is complex because it's frequently not clear what their value is. Games have often tried to incorporate movie-style stories, and so hired screenwriters, but this rarely works. Games are not really a storytelling medium, so conventions of drama tend to fail when applied to games. On the other hand, using text as a form of illustration of the game world tends to work very well. So modern game writers are tending to become more like copywriters rather than plot writers.