Yes, the Player’s Handbook and Dungeon Master’s Guide give some some examples of threats
Page 182 of the PHB has a section on noticing threats. An example of a threat it gives is “ a stealthy creature following the group“. The creature is not posing an immediate danger but they could potentially ambush the party if they were not noticed. This tells us that a threat is something that, whilst not immediately dangerous, is something that has the potential to harm the party.
In a similar sense, page 85 of the DMG lists “the threat of random encounters” as a threat, the looming feeling you could be attacked falls under an indication of potential or immediate danger.
The DMG page 123 lists a rolling sphere as a threat:
Whenever the sphere enters a creature's space or a creature enters its space while it's rolling, that creature must succeed on a DC 15 Dexterity saving throw or take 55 (10d10) bludgeoning damage and be knocked prone. [...] If the sphere's speed drops to 0, it stops moving and is no longer a threat.
This reinforces the idea that a threat is something which can cause harm to the party, though this time the threat is an immediate danger rather than a potential one.
Page 185 describing Pipes of the Sewers states “[rats] will not attack you unless you threaten or harm them”. It is unclear in this case if “threaten” means “to pose a threat” or if it means “to make a threat”. If we assume that is means “to pose a threat” (as a rat would not understand a threat spoken in Common against them) then this serves as further reinforcement that a “threat” is something that indicates potential danger or is an immediate danger.
In terms of what constitutes a threat for the purposes of surprise though, page 189 of the PHB says this:
The DM determines who might be surprised. If neither side tries to be stealthy, they automatically notice each other. [...] Any character or monster that doesn't notice a threat is surprised at the start of the encounter.
In other words, only a creature that you haven't noticed due to it hiding is a threat to you for the purposes of Surprise. If a creature is not trying to hide before it attacks you, by this rule, it can not surprise you. Personally I find this idea to be strange, if someone pulled out a dagger out of the blue and lunged at me, i’d certainly be surprised.