"I am a girl."
Translation:Io sono una ragazza.
It's optional. Mainly, like all subject pronouns (io, tu, lui, lei, noi, voi, loro), it's used for emphasis. Io ho questo libro, ma tu hai quello libro. I have this book, but you have that book. In this case, I might be emphasizing the different ownership. It could also be used if the sentence would be ambiguous without it in context. Ha, for example could mean she has, he has, or it has. If I'm talking about Cecilia and Enrico and I want to make it clear that it is Cecilia, not Enrico who has a book, I would say lei (she) ha un libro to dispel ambiguity. Normally, just leave the pronouns out. They're unnecessary, though correct.
Did you write "Io sono ragazza" or "lo sono ragazza"? I suspect you wrote the latter, because of your comment about "...including the article". (In the original sentence there is no article). Judging by the numerous comments I suspect that many students have made the same mistake by writing "lo" instead of "Io".