The circumflex was first used in
Greek, as part of the system of
accentuation devised by
Aristophanes of Byzantium (not the playwright, but a
grammarian, around 3rd century BCE). Probably his invention was motivated because colloquial Greek was changing from a
pitch accent to a
stress accent, so he was concerned to preserve the correct
pronunciation of
pitch.
Greek essentially had two pitches, high and low. A long vowel or diphthong could be either falling or rising, that is with the high pitch on either the first or the second part. A syllable which fell from high to low was called perispó:menos 'drawn around' or dítonos 'two-toned' or súmplektos 'complex'. It could be on either the final syllable or the penultimate syllable. These tone patterns are called perispomenon and properispomenon respectively.
High was indicated by the acute: ó; and low by the grave: ò. The fall from high to low was indicated by a sequence of them: ô. In Greek this is often written in a curvy way õ; though in other languages that is a different diacritic, the tilde.
The word circumflexus 'bent around' was the Latin translation of the grammatical term perispó:menos.
In modern Greek the circumflex and the acute both indicate stress, and there is no phonetic difference between them. In fact these days it is (I gather) usual to write the acute instead of the circumflex; but this practice is only a couple of decades old, if it's official. (People who know might care to /msg me.)
In French the circumflex usually indicates the disappearance of a consonant, in most cases S: hôtel, cf. hostel; guêpe 'wasp' (Latin vespa); âme 'soul' (L. anima).
In Welsh it indicates a long vowel, and is also used on the vowels W and Y.
In the Bantu language Chicheŵa (or Chinyanja) of Zambia and Malaŵi it is used over W to represent a bilabial fricative.