Which is correct?

We hadn't talked for a while.

Or

We haven't talked for a while.

Both are correct, depending upon the context.

For example:
We hadn't talked for a while until I called her last week.

Since we haven't talked for a while, I'll call her tonight.

Both sentences are correct, but they have slightly different meanings.

The sentence "We hadn't talked for a while" is in the past perfect tense. It indicates that at a specific point in the past, there was no communication for a certain period of time. For example, you could use this sentence to describe a situation where two people had not talked for a while, but then they eventually did.

On the other hand, the sentence "We haven't talked for a while" is in the present perfect tense. It suggests that there has been no communication for a certain period of time leading up to the present moment. This could mean that the lack of communication is still ongoing.

Ultimately, the choice between the two sentences depends on the intended meaning and context of the conversation.