The meaning of this dream depends on your personal context.
To dream of divorce, when it is happening to you in real life, shows how the stress in your waking life, is affecting your sleep life too.
To dream of divorce when you are not expecting to divorce from your spouse, means there were hints that this could happen. Your conscious and unconscious brain has received raw data and information that your relationship with your spouse is not all right. If you want to save your marriage, you might want to reflect on what can be done to salvage the situation. You need to talk with your spouse. Be open to the idea of consulting a marriage counselor/ therapist.
To dream of a divorce when you had an inkling of that direction, means you were affected enough to have your subconscious continue this stream of thought, even in your sleep. You might desire to seriously plan out the steps to execute this idea.
If you dream that someone else is going through a divorce, ask yourself if that is true. If you know that couple is undergoing a divorce, your dream was merely repeating what you already know. This could have been a reminder of the actual context.
If you dream that a couple in your circle of acquaintance is going through divorce, and this has never been revealed, your dream can be a message. This type of dream could have been triggered by your intuition, based on your reception of information, experience, cultural contextual reference and interpretation of the sum total of all.