Like in english too, there are three types of articles:
definite articles:
Ich bin der Bauer.
I am the farmer.
You might use this article, when you are the only one farmer in a bigger group, and you are member of this group because you are a farmer. Someone is asking all participants: Who of us is the farmer? and then you might answer with the sentence above.
But you could also ask explicitly for the farmer:
Wer ist der Bauer?
Who is the farmer?
indefinite articles:
Ich bin ein Bauer.
I am a farmer.
This is when you are one of many farmers (and many other people), and when you are asked for your profession. Or you ask yourself a question:
Sind Sie ein Bauer?
Are you a farmer?
the null article:
Ich bin Bauer.
I am farmer.
The null-article is also suitable when you are asked for your profession. And here are the null-article-questions:
Sind Sie Bauer?
Are you farmer?
Since I am not an English native speaker (but a German native speaker) I am not sure, how widely use the null-article-version is in english.