両方ともよい。

English Translation

They are both good.

What is the grammatical purpose of とも in this sentence? why wouldn’t a simple も or other particle suffice?

I think 両方とも is a single word、like 二人共 (ふたりとも).

共 may mean “both” or “together”. It is strange that both my dictionary and my IME both use kana for one and kanji for the other, but I think the meaning is the same in both cases.

So both words appear to mean “the two together”. Although 二人共 refers specifically to people, While 両方とも seems to mean more “both sides”.