1. They are a poet and a statesman.

2. He is a poet and statesman.
3. They are a poet and statesman.
4. Both are a poet and a statesman.

(Are they all grammatical? In #1 does 'they' refer to 'Both'?)

Yes, they are correct.

Sentences like these need to be in a paragraph. The noun/nouns that pronouns refer to need to be earlier in the same sentence or in a previous sentence. So "they" would refer to someone in an earlier sentence -- and I hope it would be a clear reference.

#1 refers to 2 people.

#2 refers to 1 person.

#3 and #4 are confusing. In both, it's not clear if both people referred to are poets and statesmen ... or if one is a poet and one is a statesman.