The correct option is
D that
In the given sentence, the word 'red' is used to modify the hat worn by Kathy. Thus, there must be a pronoun that connects the sentence to the adjective 'red', which will also refer to the noun 'hat'. Thus, the correct answer must be a relative pronoun.
Option A is incorrect. 'it' is a personal pronoun. Although it might refer to the noun 'hat', it does not connect the sentence to 'red'. Thus, it is not the correct answer.
Option B is incorrect. In the given sentence, 'so' acts as an adverb and not as a pronoun. Thus, it does not refer to the noun 'hat', an is the incorrect option.
Option C is correct. 'that' is a relative pronoun. Thus, it joins the sentence to the adjective 'red'. Thus, it also refers to the hat worn by Kathy, and is the correct answer.
Option D is incorrect. In the given sentence, 'such' acts as an adjective and not a pronoun. Thus, it is not the correct answer.