One possibility is that the greeting is intended ironically or sarcastically.
An ostensibly meek, mild-mannered person might be greeted with "Hello, Trouble" or "Here comes trouble!"
as a way of teasing them.
This is similar to calling a very large person "Tiny".
You might say this to anyone, really, but it's one of those things that's funnier when it's not true.
ell.stackexchange.com/users/2274/Tyler James Young
It's a flirtatious phrase often said by a man to a/n (attractive) woman (of child-bearing age).
It's a backhanded way of saying, I like you.
and I'm attracted to you.
without actually saying it directly.
(It can also be used sarcastically by being said to or about a woman who might look a little "edgy" or "slutty" — again, depending on context.)
The word trouble (in this context) alludes to the fact that attractive women often get men into "trouble" because attractive women can often get men to do things men would not otherwise do.
Like spend money, cheat on their wives, "make babies," get married, etc.
It's a way of opening the door for you to respond back to the speaker in a similarly flirtatious way.
Thereby, opening the door for him to talk to you in a more personal way with the goal of eventually "dating" you.
Alternative Theories
To borrow a phrase from JR's page :
Context is everything .
So, in an effort to give a complete answer, a "flow chart" of possible meanings comes to mind as follows.
Is the OP an attractive adult female of child-bearing age and is the speaker a (presumably) heterosexual adult male?
If "yes" to both, I would estimate the odds of the meaning provided above to be roughly 95% to 99%.
If "no" to either, go to step 2.
Does the OP match the description in Tyler James Young's answer: "meek, mild-mannered?
"
If "yes," I would estimate the odds of that answer being the correct interpretation at 95%-99%.
If "no," go to step 3.
Consider the following alternative meanings.
It's sometimes a backhanded way of a senior male paying a junior male a half-compliment, half-slight.
For example, if the junior male is "studly" or "manly" in some way by either being good-looking, attractive to women, good at sports or a "bad boy."
(Or intelligent or wealthy too, for that matter.)
If the speaker is speaking to a child, it could be the meaning described by FumbleFingers in his/her comment to the OP.
If the speaker is (nominally) speaking to a pet, it could have a similar meaning as FumbleFinger's description; only applied to a pet instead of a child.
ell.stackexchange.com/users/22728/Mowzer
It is not always a flirtatious greeting but nearly always friendly.
Can be joking.
Very very rarely because you actually caused a problem, and if you actually did cause a problem, can ease tension.
(source- native speaker)
ell.stackexchange.com/users/22756/chauxvive
When you greet a kid you can say "hello little troublemaker" or hello trouble for short.
you can apply it to adults too.
That is the context I would typically hear/use it.
ell.stackexchange.com/users/22757/drawde83
I regularly call my boyfriend ‘troublemaker’ because he is mischievous when he is being flirtatious.
He causes me ‘trouble’ because he make me want to do things like continue talking to him more when I should be doing other things, like sleeping.
It’s affectionate in that way.
If it’s a colleague, they are probably just trying to break the ice with you/ become closer in a friendly way.
English is funny that way, it’s much more the tone and context in which a person says something than the words themselves.
(I know other languages have that too, but it can be so confusing at times, even for a native English speaker)
If they were smiling/laughing or if they looked serious and then grinned after you said hello.
It was just friendly teasing and they want to be more casual with you, which is often a good sign with colleagues.
ell.stackexchange.com/users/107184/user107184
What does it exactly mean if somebody says "Hello, Trouble" to you?  One of my colleagues said "Hello, Trouble" to me this morning.  I just replied "Hi", as I was not sure what to say.   So just wanted to check what exactly Trouble here means...
If somebody calls you "Hello Trouble", what does it mean?
ell.stackexchange.com
<meaning-in-context><american-english><slang>
ell.stackexchange.com/questions/65831
ell.stackexchange.com/users/3960/Srekk
The greeting is often intended ironically or sarcastically - as a joke. It is very rarely because you actually caused a problem. When you greet a kid you can say "hello little troublemaker" or hello trouble for short. It's a backhanded way of saying,  I like you.  It can be flirtatious (although not always), and it is nearly always friendly. This can be said ironically, sarcastically, flirtatiously or as a joke.
This can be said ironically, sarcastically or as a joke. It may be flirtatious.