In my point of view these two are the same and both talk about two actions that respectively was done in the past.
But which one is correct and what is the difference between them if there is any?
- When we had finished dinner, we went out.
- When we finished dinner, we went out.
When we talk about past actions in the order in which they happened,
we use the simple past tenses.
First we had our dinner, then we went out.
If we talk about actions happened simultaneously, we can use the
simple past tense.
When he saw elephants, he was amazed.
However, if we talk about two actions happened in the past one after
the other, we use the past perfect tense for the first action.
Before she went to the zoo to see elephants, she had read a lot about them.
When we had finished dinner, we went out.
(More explanations and examples are here.)