Hornets are attracted to lights far more than wasps or bees and hornets are more active at night, whilst its not normal for the average person to have hornets tapping against their window, if you have a hornets nest in the vicinity this will happen.
I'm a pest controller and very often ask the questions about hornets tapping on the window at night to differentiate between wasps, bees, and hornets when people phone to make enquiries.
Its amusing as nearly every phone call we get during the summer about hornets turn out to be wasps or bees and the caller is always allergic to them, I think what they are really saying is they are allergic to pain, yes a sting hurts!!
But hornets rarely sting, very docile creatures.