A number of languages allow omitting pronouns (even) in formal speech and writing. Spanish is one of them, although the pattern is restricted to subject pronouns.
German, like English, is generally "non-pronoun-dropping". However, in informal and colloquial speech, it's not uncommon in either language. Some often-heard examples:
Kann sein. (Could be.)
Weiß nicht. (Don't know.)
Mach ich. (Will do.)
Linguistically, these omissions are ellipses (Ellipsen). As such, they are not governed by a firm grammatical rule, but by speech register and style. The complete phrases would be:
Es kann [so] sein. (It could be [so].)
Ich weiß nicht. (I don't know.)
Das mache ich. (I will do that.)
In an informal context, it is perfectly normal and not unusual to leave out these pronouns. And although I cannot provide a general rule (as per the above), this is not just true for these examples, but for the majority of ordinary phrases where the sentence's leading subject or object can be easily inferred from context. In fact, Wikipedia, in the article linked first, observes (albeit without a reference):
Colloquial and dialectal German, unlike the standard language, are also partially pro-drop; they typically allow deletion of the subject pronoun in main clauses without inversion, but not otherwise.
In the question's second example, I would consider the "half-hearted" introduction borderline impolite, unless it was immediately preceded by other people introducing themselves using the full sentence ("Ich bin …"). Simply because its demonstrated brevity runs counter to common courtesy. The third example, the line from the song, is however neither informal nor colloquial in style. The elliptical usage there lends a decidedly poetic touch to the lyrics.