both of katta & datta express the past tense.
datta is used with noun.
ex)
-he was my friend. (watashi no tomodachi datta)
-it was rain yesterday. (ame datta)
katta is used with adjective
ex)
-it was cold. (samu katta)
-that cake was very good. (ano keki ha oisi katta)
warui is objective, so it b warukatta.
if you use warukatta, you can say like "the hotel staff were impolite to customers " in english.