If you are writing a diary in a dream, it shows that you wish to talk with someone about your life, problems and dreams, but there is no one who you could trust, therefore you trust only yourself.
Dream dictionary: Diary dream meanings
The diary in a dream, represents the memories, the past and secrets we are hiding. Perhaps you are trying to look back at your history in order to find some answers or you are trying to get some privacy while making important decisions. Please see also the meaning of journal.
Represents nostalgia or memories of our childhood. If we open it and see it is blank, then it indicates that we would like to erase the past. The feelings we have in the dream is how our past has been.