The framing stories used in Citizen Kane, Sunset Boulevard, and The Cabinet of Dr. Caligari are all there for a reason. Each suits their own purposes of distorting the audience's expectations. In Caligari's case, the framing story tells the audience that the following is this person's story, so the very distorted and expressionistic images to come are alright because it's coming from the character's head and not reality itself. At the end, the Frame is also used to change the entire film's message, flipping everything over and (hopefully) making the audience think.
Citizen Kane and Sunset Boulevard both have framing stories in which the main character dies. This gives the audience an impending feeling of doom throughout the following flashback, as they know that this man will end up dead. Thus it becomes not a question of If this character dies but a question of How he dies. This technique is used a lot nowadays, but it also enjoyed heightened popularity in the 40s noir pictures (Double Indemnity comes to mind). In a few short minutes, the filmmakers shade their entire film with drab fears and bleak fatalisms that sold to the audiences of that time.
These framing vignettes are important to the meaning of each film for several reasons. In the case of Caligari and Kane, the film is all about Point Of View, and how one man's take on an event might quite possibly be completely different from another's. By establishing that we the audience are either hearing a man's tale or learning about a man that cannot speak for himself, we're relinquishing the validity of everything we see.
The importance of Sunset Blvd.'s framing set-up is a bit different, in the fact that although the main character has died, he's still telling the story. POV is still prominent, but we don't get opposing viewpoints as in the other two films.
We believe everything he says, but know how the story is going to end. This is important to establish that sense of determinism, the feeling in the back of one's mind that although things may be going well now, somehow or another they're bound to mess up. Since this is one of the major themes in the film, Billy Wilder thought it was important to introduce it as soon as possible in the form of the Frame.
The one common effect that these framing stories have over all three films mentioned is mystery. Put simply they make the audience think. Either by revelation at the end, or subconscious doom, the audience is given something to chew on while they watch the film, trying to make sense of the beginning as they watch the middle and end. Audience participation is rare and valuable but the masters behind these films found a way to involve the people in the darkened theater without even letting them know.
More so than just another film technique, the framing story helps to define these three films. A bit like a note from the director himself, the Frame helps the audience engage themselves in the film.