The correct option is B that
A relative pronoun performs the function of a pronoun, as well as a conjunction. It refers to the noun that's mentioned in the first sentence and it combines two sentences as one. In the given sentence, "a man" is the subject because it performs an action "can have" over the object "happy family". The object receives the action that the subject performs. The object is the antecedent "family" of a relative pronoun. In such cases where the object is the antecedent and not the subject, the relative pronoun is generally omitted, 'that' is the relative pronoun here, as 'that' refers to persons. Here it relates to the antecedent 'family'. Hence option B is correct. The sentences before they're combined, both have a subject and an object, in the first part "A happy family is the best gift" contains the subject "a happy family", the verb "is" and the object "best gift". When it's combined to the second part "a man can have", the subject "family" becomes the object now. Hence, the "gift" is still an object, it's not a relative pronoun and option A is incorrect. 'Man' is the subject as it performs an action "have", it isn't a relative pronoun because it does not refer to the antecedent "family". Hence option C is incorrect. 'Best' is an adjective that modifies the noun 'gift', it does not play the role of a relative pronoun. It neither refers to the antecedent nor combines the sentences, hence option D is incorrect.