“What happens if a will is written in a diary with the signature of the person who wrote it, but no witness signatures?”

That will depend in large part on in what state the will is probated, and in what state the decedent passed away (if different). In some states, such as California, a holographic will (i.e. a will written in the decedent’s own hand) with no witnesses is admissible. Although, if someone contests the will, be prepared to have to bring in a hand-writing expert, at least.