before vowels somat-, word-forming element meaning "the body of an organism," from combining form of Greek sōma (genitive sōmatos) "the body, a human body dead or living, body as opposed to spirit; material substance; mass; a person, human being; the whole body or mass of anything," a word of uncertain origin. Perhaps originally "compactness, swelling," and from PIE root *teue- "to swell."
before vowels ophthalm-, word-forming element meaning "eye," mostly in plural, "the eyes," from Greek ophthalmos "eye," originally "the seeing," a word of uncertain origin. Perhaps from ōps "eye" (from PIE root *okw- "to see") + a form related to thalamos "inner room, chamber" (see thalamus), giving the whole a sense of "eye and eye socket," but Beekes rejects all this and finds it to be probably Pre-Greek.
Old English -istre, from Proto-Germanic *-istrijon, feminine agent suffix used as the equivalent of masculine -ere (see -er (1)). Also used in Middle English to form nouns of action (meaning "a person who ...") without regard for gender.
The genderless agent noun use apparently was a broader application of the original feminine suffix, beginning in the north of England, but linguists disagree over whether this indicates female domination of weaving and baking trades, as represented in surnames such as Webster, Baxter, Brewster, etc. (though spinster probably carries an originally female ending).
Also compare whitester "one who bleaches cloth;" kempster (c. 1400; Halliwell has it as kembster) "woman who cleans wool." Chaucer ("Merchant's Tale") has chidester "an angry woman." In Modern English, the suffix has been productive in forming derivative nouns (gamester,roadster, punster, rodster "angler," etc.; the 17c. had scoldster).