Here are several reasons. Hallucinations generally occur to people who are imaginative and of a nervous make up. However, the appearances of Jesus occurred to a variety of people. Hallucinations are subjective and individual. No two people have the same experience.
Hallucinations occur only at particular times and places and are associated with the events.
The Resurrection appearances occur in many different environments and at different times. Finally, hallucinations of this nature occur to those who intensely want to believe. However, several such as Thomas and James, the half brother of Jesus were hostile to the news of the Resurrection. If some continue to argue for this position, they still must account for the empty tomb. If the Apostles dreamed up the Resurrection at their preaching, all the authorities needed to do was produce the body and that would have ended the Apostles' dream.