It is neither accusative nor dative. It is a genitive attribute inside a nominal phrase which is in nominative case.
The question is not whom? but whose? (wessen?)
Wessen Schutzgottheit ist Hanako?
Hanako ist die Schutzgottheit dieser Schule.
Whose patron deity is Hanako?
Hanako is the patron deity of this school.
Asking whom makes no sense in this sentence.
Here is the full analysis of your sentence:
- Hanako
This is a noun in nominative case. It is a ghost's name, and the grammatical function of this noun in nominative case is that of the subject. This word is singular. Its gender is unclear and not important in this sentence. (I think Hanako is a male ghost, so the gender should be masculine, but I don't know Hanako. But as said: In this sentence the grammatical gender of the name of this ghost plays no role.) This word is in 3rd person, like anything that is not a pronoun.
- ist
This is a copula. A copula is a linking (coupling) verb. Most verbs describe actions, but copulas indicate equivalences. This verb is in singular and in 3rd person, so it matches with the subject in these two qualities (number and person). And it is in Präsens which is a German tense that is similar (but not equal) to English present simple tense and also to present continuous tense. This verb rules all other parts of the sentence. (This is what all verbs do in all sentences.)
- die Schutzgottheit dieser Schule
This is a nominal group (aka "nominal phrase", "noun group" or "noun phrase") in nominative case. This is the part of speech that is linked to the subject by the copula. The copula indicates, that what is named by this nominal group, is the same as the thing that is named by the subject. This nominal group looks like an object, and sometimes you might also hear the term »Nominativobjekt« (nominative object) for this construction, but in fact this nominal group is a part of the predicate1 and it is called »Gleichsetzungsnominativ« (equational nominative).
The nominal group »die Schutzgottheit dieser Schule« can be analysed further:
- die
This is an article. It is definite, singular, feminine and in nominative case. Its grammatical function is that of a determiner of the core noun of the nominal group. It matches with this core noun in number (singular), gender (feminine) and grammatical case (nominative).
- Schutzgottheit
This is a noun (recognizable by its uppercase first letter), and it is the core of the nominal group. It is in nominative case because it is connected to the subject (which is always in nominative case) by the copula »ist«. So, it inherits the case by mediation of the verb from the subject. And because it is the core (or "head") of a nominal group, the complete group appears, when seen from the outside, as something that is in nominative case.
- dieser Schule
This is a right genitive attribute of the core of the nominal group. So, it is something that is attached to the right side of the noun which is the core of the group. And it is an object in genitive case. Such attributive genitive objects indicate possession. The object itself names the possessor (owner) (this school) and the noun to which it is attached (protective deity) names the thing that is possessed (owned).
There are two things left to be analyzed in a third layer:
Schutzgottheit
This is a compound noun. It can be translated into Englisch as "protective deity" or as "patron deity". It consists of two parts:
- Schutz
This means protection. In this special context it can also mean patronage which is a special kind of protection.
- Gottheit
This is the German word for deity. It literally means god-hood or god-ness (like Kind-heit = child-hood or Krank-heit = sick-ness).
dieser Schule
This is a nominal group in genitive case. This nominal group in genitive case is embedded as a right genitive attribute inside an outer nominal group which functions as an equation nominative in nominative case.
- dieser
This is a demonstrative pronoun. It functions as a determiner of the core of the nominal group. It is singular, feminine and in genitive case. In all these qualities (number, gender and case) it matches with the noun who's determiner it is.
- Schule
This is a noun (uppercase first letter) and the core of the nominal group. Being the core of a nominal group it must be in the same case as the whole nominal group, so it is in genitive case.
1 In English grammar the predicate is anything in a sentence that does not belong to the subject. But in German grammar the predicate consists only of the verbs and those parts of speech, that are very closely connected to the verbs. So, all objects do belong to the predicate in English grammar, but in German grammar no object can belong to the predicate.