HIs mother was all the more angry because he had forgotten to buy it.
If the past perfect was changed to the simple past as this, would it still be OK and have almost the same meaning?
HIs mother was all the more angry because he forgot to buy it.
So they are almost the same. Good.
Just our of curiosity, do you see any subtle difference between the two?
The difference is not obvious, but this is my understanding of it.
Using the simple past, he has just come back from the shops and didn't buy whatever it was he was supposed to buy. With the past perfect, he forgot to buy it before that (for example, yesterday).
Would you agree with waflob, bhaisahab?
However, it not always worth it.
You have not given enough context to judge whether the past perfect is indicated here. That makes it possible to argue either way and with possibly equal strength that i) they mean the same, or ii) they mean different things, or iii) given the case, it doesn't matter.
I'd argue for iii.
Hmm...If 'You've done it', for example, sprang to your lips instead of 'You did it', I thought the feel or the psychology behind might be different although semantically both are almost the same.
Practically speaking, that difference might not matter. I agree. But linguistically and psychologically, I thought it was worth giving a thought to. That's why I said 'just out of curiosity".