At night, the zombie hordes come out to destroy your city. You can move your survivors into certain buildings such as watchtowers and shacks so they are able to kill the enemies before they take your main houses' health to 0. If this happens, you will lose and receive a Game Over.
You can also tap the Auto Play button where the AI will move your survivors around to optimal locations to attack enemies. However, the AI will not use items or survivor abilities. The AI will also not take weapon types and enemies' weaknesses into consideration. Because of that, a sniper might be put in an awkward situation and might get overrun.
It's usually best to play the night yourself, so you can take advantage of those weaknesses.