The correct answer is A. She told me that it had been raining heavily and I could not go.
The sentence “She said to me, ‘It has been raining heavily and you cannot go'” is in the past tense. This means that the speaker is telling you about something that happened in the past. In this case, the speaker is telling you that it was raining heavily and that you could not go somewhere.
Option B is incorrect because it uses the present tense. The speaker is not telling you about something that is happening right now, but about something that happened in the past.
Option C is incorrect because it uses the present perfect tense. The speaker is not telling you about something that has happened in the past and continues to happen now, but about something that happened in the past and is now over.
Option D is incorrect because it uses the simple present tense. The speaker is not telling you about something that is happening right now, but about something that happened in the past.