Wright is an English and Scottish occupational surname from Old English wryhta/wyrhta, "worker" or "maker." In later Middle English it often meant a skilled woodworker—carpenter, joiner—or the builder of windmills and watermills. Compounds like Cartwright and Wainwright keep the same root visible.
Where Smith named the metalworker, Wright named the shaper of wood and machinery. The surname does not mean "one who writes"; that is a modern mix-up with the verb write. In Scotland, wright remains an ordinary word for a carpenter.