The short story Orange by Neil Gaiman, from his collection Trigger Warning takes your idea one step further: it's framed as a subject's responses to an investigator's written questionnaire. The questions aren't even there - only the answers.
It starts:
Jemima Glorfindel Petula Ramsey.
Seventeen on June the ninth.
The last five years. Before that we lived in Glasgow (Scotland). Before that, Cardiff (Wales).
You see how you don't need to see the questions, to know what they are? Not all information needs to be put into words on the page - we are quite good at inferring.
For the "story" itself (since the first questions are more of an introduction, really), here's an example:
- About half a metre above the carpet. She'd sink down a bit to go through doors, so she didn't bump her head. And after the hose incident she didn't go back to her room, just stayed in the main room and floated about grumpily, the colour of a luminous carrot.
Again, it is quite easy to infer all the bits that haven't been spelled out for you.
When you're writing, you have to have a very clear idea of the things that you're not putting on the page. If what you're giving the readers is only dialogue, you need to know what's happening, the emotions, etc., and you need to make sure those events and emotions are adequately conveyed by the dialogue, that is - the reader can infer them from the dialogue.
When you want to create suspense, you can hide things by means of the format: your character might respond in surprise to something the reader cannot see. But ultimately, suspense needs to be resolved, the reader must learn what's going on.
@sesquipedalias mentions plays in a comment. That is indeed a useful reference point. In particular, older plays, like Shakespeare, have very little stage directions, except for entrances and exits. Everything that's going on, even the time of day, and most certainly emotions etc., are conveyed by the dialogue itself. There is, however, a big difference: Shakespeare is telling you who is saying what. That's one more bit of information you'll need to convey within the dialogue.