Look at what each time marker already carries as meaning, then check if the sentence adds the same meaning again unnecessarily.
It is 2 pm in the afternoon: Since "pm" is short for post meridiem, which already means afternoon or later, tacking on "in the afternoon" duplicates that meaning needlessly.
It is 2 pm: On its own this sentence is correct English, but it does not match the format the question is testing, a time expression combined with a period of day.
It is 2 pm in the noon: "Noon" specifically refers to 12 o'clock midday, so saying "2 pm in the noon" mixes two different times together and does not make sense.
It is 2 o'clock in the afternoon: "O'clock" by itself is neutral about am or pm, so it genuinely needs "in the afternoon" to specify the time of day, and here that addition is doing real work instead of repeating information.
So option D is the grammatically sound and non repetitive sentence.