"to hiss or deride," 1920, shortened and altered variant of raspberry (q.v.) in its rhyming slang sense. Related: Razzed; razzing. As a noun, in to give the razz, from 1919.
His fellow workers razzed him when he wore a jacket and tie