Both sentences are grammatically correct but they imply different things. Because of this, one of them will be the better choice depending on the context. It is this match between hint and context that makes something feel natural.
In 1999, I lived in Cuba.
That's a declarative statement. The most important idea you're trying to convey is where you lived in 1999 [full stop].
In 1999, I was living in Cuba.
This still says where you lived in 1999, but that's no longer the main idea; it hints at something else. You are either responding to or about to introduce a more important idea and where you lived in 1999 is secondary to that.
For example, that sentence would make sense and sound natural if you're now in Europe and responding to someone else who has been talking about the introduction of the euro. "In 1999, I was living in Cuba. I don't really remember that."
Another context where it would make sense and sound natural would be if you went on to talk about watching the Baltimore Orioles play in Havana. "In 1999, I was living in Cuba. I can still remember how excited the island was during the exhibition game." There's more to the story and the first sentence alone doesn't tell it all.
Now, as to why your teacher called it wrong. I don't know but here are some guesses.
It's a common mistake for English language learners to use a "was {verb}ing" construction in all cases, even where the simple past should be used instead (which ends up sounding very unnatural). Some people over-correct by avoiding this construction even when it might be okay to use.
This "was {verb}ing" can hide whether or not you know the proper conjugation of an irregular verb. As a teacher I may be more interested in some other, specific aspect at the moment. In other words, it may have been the wrong answer for that particular exercise.
You could be "reading into the question." When a word choice is justified by context but that context is not given, look to see if there is an alternative that does not need an assumption. Many questions will ask you to pick the best answer.
There is a nice comparison of the past continuous and past simple by English Grammar Today at the Oxford Dictionary website.