1640s, "state paper, official document," from Latin diploma (plural diplomata) "a state letter of recommendation," given to persons travelling to the provinces, "a document drawn up by a magistrate," from Greek diploma "licence, chart," originally "paper folded double," from diploun "to double, fold over," from diploos "double" (see diplo-) + -oma, suffix forming neuter nouns and nouns that indicate result of verbal action (see -oma).
The main modern use is a specialized one, "a writing under seal from competent authority conferring some honor or privilege," especially that given by a college conferring a degree or authorizing the practice of a profession (1680s in English).
The plural is always -mas in the ordinary sense (certificate of degree &c.), though -mata lingers in unusual senses (state paper &c.) as an alternative. [Fowler]
Compare diplomacy, diplomatic.