Here is what the Oxford English Dictionary (OED) says about that the suffix -o.
It originates from three separate sources.
First, in some cases it comes from the final syllable of words that come from Romance languages.
Second, in some cases it results from shortening a word that had a medial o. This was especially likely to happen in compound words which the truncation happened after a prefix (or other combining form) that ends in -o.
Third, in still other cases, it came from the second element in such exclamatory phrases as heave ho and hey-ho. This second element might have had one of the three forms: ho, O, or oh. This ending then got attached both full words and to their truncations.
All of the information comes from the OED.
The first source: words coming from Romance languages
Prior to the 16th century, when English would borrow words from Romance languages that ended in -o, the final vowel would be removed, because that fit better with the English phonetics. But starting in the early 16th century, English started borrowing such words from Italian, Portuguese, and Spanish without discarding the final vowel (Morisco, frizado, etc.). Up to that point, English didn't have unstressed final long vowels, and so there emerged a tendency to confuse the final o and a. In fact, in spelling, the final o often replaced not only a, but other syllables as well. It is in this period that we got camisado from Spanish camisada, for example. This tendency continued into the 17th century and beyond, producing e.g. mango and lingo from Portuguese manga and lingua. Sometimes, English words were coined as imitations of Romance loanwords. For example, stingo (strong ale or beer) appears to have been formed from the perfectly Anglo-Saxon sting (in allusion to the sharp taste) by adding the final -o so as to sound Spanish or Italian. By the late 18th century, the final -o had become commonplace enough in English that it started to appear in new words of undetermined origin, e.g. bingo and rhino.
The second source: the medial -o
The earliest examples come from the late 17th cent. and early 18th centuries, when we got e.g. plenipo from plenipotentiary, memo from memorandum, and (now obsolete) hypo from hypochondria. What happens is that the longer word is truncated after an o that appears in the middle, particularly if this o occurs at the end of a prefix or a combining form. One result was that people started to associate the ending -o with a casual or light-hearted tone, a tendency that survives to this day. In the early 19th century we get e.g. loco from locomotive. This type of truncation become very common after the middle of 19th century, and is very common still.
The third source: heave-ho etc.
As early as late Middle English (approximately 1400-1500), the attachments ho, O, and oh begin to be attached to other words to form conventional cries and refrains such as heave ho and hey-ho. This practice continued, with alive ho! appeareang no later than the early 1700s. In the later 1800s and early 1900s, we get righto, billy-o, and cheero. Particularly in the second half of the 19th century, a number of words are formed in this way to form refrain-like or evocative expressions, but which are then used as ordinary nouns and adjectives. Sometimes these are written as hyphenated compounds. Examples include smoke-ho ('A stoppage of work in order to rest and smoke. More generally, a tea-break, a rest period. Also, a cup of tea or a snack taken at work.'), bottle-oh ('A person who collects empty bottles and sells them for reuse.'), and dead-oh ('dead drunk'). From the early 20th century, we get rabbit-o ('A (usually itinerant) seller of rabbits as food.'), and from the middle of the 20th century, daddy-o (meaning daddy, in various colloquial senses). Other words formed that way are written with as having a suffix -o, and it is somewhat arbitrary whether one wishes to count them as examples of the present suffix. The earliest example that shows a clear transition from the hyphenated to the non-hyphenated form is milko ('a milkman'); other examples in the same category are, from the late 1800s, kiddo and Relievo ('a children's seeking game in which a captured player may be released by another member of his or her side'), and, from the first half of the 20th century, whizzo ('excellent, wonderful') and socko (as an adjective, 'stunningly effective or successful'; as a noun, 'a success, a hit').
From the early 1900s, the addition of the suffix -o to form new words becomes very common. So we got wino, whacko ('An exclamation of delight or excitement: Splendid! Excellent! Hurrah!'), and cheapo. The word beano , from the second half of the 19th century, is probably the earliest example of the addition of -o to a truncated word (it was originally bean-feast). Examples from Australia include Salvo ('a member of the Salvation Army; plural, the Salvation Army') and robbo (originally apparently formed from the proper name Robinson, it means 'a horse and trap, esp. one in a ramshackle condition; the driver or hirer of one of these. In extended use: an inferior, substandard, or decrepit person or thing'). In the 20th century, we got e.g. wacko and ammo. In Australia, several such formations appeared, e.g. arvo ('afternoon').
The suffix is often used to create product names. Early examples, from the late 1800s, are blanco ('A white preparation for whitening accoutrements; also, a similar preparation of khaki colouring') and Oxo ('An extract of beef, originally a liquid, now usually formed into a cube designed to dissolve on contact with hot water, used as the basis of drinks, soups, and gravies; (also) the drink made from this extract. Frequently attributive as Oxo cube.')