Simply, it's an informal way of saying either I did something good and I want you to know about it or something good has happened to me and I'm happy about it.
I found a $10 bill on the street - yay for me!
Looks like I'm first in line for the promotion - yay for me!
Interesting. I don't think this is common in British English yet. But then, a slightly less elated expression would probably be more likely in BrE, in those contexts:
1. I found £10 in the street. ******. Now I suppose I'll have to go to the police station and hand it in.
2. Looks like I'm first in line for the promotion. Just my luck. Now I suppose I'll have to start going to al