Either a crazy emergency or much more likely to be someone planning to con or rob you.
If you get a knock at a weird time, don't open the door. Ask them if they need you to call the police this because it covers emergencies and criminals.
"Do you need me to call the police for you?!"
Either way, it probabaly doesn't hurt to call the cops and report someone wandering the neighborhood at 3 AM looking for help or looking to rob people. Let the cops provide the help, they are there to "protect and serve" after all.
Having seen the videos of people pretending to need help then a bunch of thugs ambushing the home owner, I wouldn't ever open the door. I'd tell them I will dial 911 for them if they need help for an emergency, then maybe open the door only after dialing. Chances are high they will say no and scram.
There was a case I know of late at night a girl went missing in a lake, and the others with her didn't have phones or they were dead or something, so they had to knock on doors to get someone to call for help. And then also the girl recently running around with shackles on her arms who escaped being held prisoner.
So, offer to call 911 before you open the door to protect yourself from the much more likely criminals.