Something that's done threateningly happens in a menacing, frightening way. If a strange dog lunges and barks threateningly at you, its owner's insistence that the dog is friendly won't be particularly reassuring.
Glaring threateningly at your younger brother when he starts playing with his food might encourage him to mind his manners. When someone threatens violence, they behave threateningly. You would be smart to steer clear of an angry person behaving threateningly in a public place. The adverb comes from threat and its root meaning of "press or push."