Is it written “allora” or “all’ora”?

Both forms are correctAllora can have different meanings.It can be a conclusive conjunction with the meaning of “therefore” that introduces a logical consequence to what has been said previously. 

Marco non ha studiato, allora non ha passato l’esame.

It can perform the function of time adverb with the meaning of “at that time” in the past or future.

Allora non ero ancora laureata.

In other cases the word is then used to create emphasis in interrogative sentences or with the meaning of “in that case”, “if so” in exclamation sentences.

Allora, hai deciso cosa fare?

Se sei a Cagliari, allora devi andare al mare!

All’ora is an expression of time value used to indicate the time when an action occurs, “in that date time” but is also used with the meaning of “for each hour”. 

Mio padre ci raggiunge all’ora di cena.

La macchina correva a 100 km all’ora.