You're a teenager. Your friend got both of you tickets to a concert that you wanted to go to. You shout this when she tells you.
"Sweet!" can be used by itself like in the example above. Or it can be used in a sentence:
That is sweet!
By the way, this use of "sweet" is different from when you call a person "sweet". For example:
You are so sweet.
When you call a person "sweet", it means that they're nice, kind, thoughtful, and so on. When you call a thing "sweet", it means you're excited about it.