Shakespeare’s problem is how to get from I.4 (at Forres, where Macbeth has heard the witches’ prophecy and been made thane of Cawdor) to I.5 (at Inverness, where Macbeth and Lady Macbeth plot the murder of Duncan) quickly and dramatically. There are various ways a playwright might go about this:
Macbeth arrives at Inverness, meets Lady Macbeth, and tells her the events of the play so far. Her mood changes from delight (at her husband’s survival), to pride (at his promotion to Cawdor), to wonder (at the witches and their prophecy), to ambition (at her prospect of becoming Queen of Scotland), and finally they plot together. This could be a tour-de-force for the actor playing Lady Macbeth, but the trouble is that this leaves the play no further forward: such a scene would simply bring Lady Macbeth up to date with material that the audience has already seen acted on stage.
Macbeth arrives at Inverness, meets Lady Macbeth, says something like, “I have many wondrous things to tell you, let us talk anon”, the two characters go off-stage and come back on at the point where they begin to plot. The trouble with this is that there would need to be some action on-stage in the interval, and it is not clear what this could be. The other characters are still on their way from Forres to Inverness. Perhaps Banquo could come on and give a soliloquy about how he feels about the prophecy, but this is just stalling for time.
The scene starts with the characters beginning to plot, having already met and gone through the events. The trouble with this is that we miss the dramatic moment where the two characters meet and recognize each others’ ambition.
The letter is a dramatic device that resolves all these difficulties: it allows Lady Macbeth to go through the events of the play, and the emotions associated with them, off-stage, so that she is all caught up when she appears; and it allows Macbeth and Lady Macbeth to meet on-stage, react to each others’ ambition, and immediately begin to plot, moving the action forwards rather than stopping to recapitulate it.
In a novel, there would be other solutions. The scene of Macbeth recapitulating the story to Lady Macbeth could be given in summary, using indirect speech instead of direct speech. Or the novel could begin in media res, with Macbeth narrating the events of act I to Lady Macbeth upon arrival at Inverness, so that the readers learn of the prophecy at the same time as Lady Macbeth. But these devices are not available to a playwright.