Why did we 'invent' capital letters? When did they first appear and how else have they been used throughout history (now, usually for proper nouns and the starts of sentences along with some other niche uses)?
It's actually the inverse: smaller (lower) case versions of the Latin alphabet were 'invented' after capitals. If you look at Roman texts you'll notice they are all familiar 'capitals'. Over time (hundreds of years) monastics in western Europe developed a variety of sizes of letters, it seems for emphasis on certain words. By the 8th century there are a lot of different script sizes and variations with various flourishes. It is believed the the Carolingian chancellery scribes simplified and formalized upper and lower case alphabets and script type for purposes of communications across Charlemagne's empire. The Carolingians continued to produce texts in uppercase as well, but the move to combinations was well under way and as such inherited by later medievals. In manuscripts we call upper and lower case 'majuscule' and 'minuscule' respectively.
edit: For whatever reason the image links weren't working for some people. Thanks to /u/Sneaky_Devil for moving them to imgur. As well here is an image which shows the progression from pre-Caroline script to formalized Caroline minuscule/majuscule.
The history of the development of the written language is really neat.
Capital scripts, like roman capitals and rustics and renaissance capitals are scripts that appear to consist entirely of capital letters to our modern eyes but 'capital' in this place doesn't carry with it the grammatical implications of modern language. In the second to fourth centuries, the Uncial and Half-uncial scripts were developed that showed a "rounded aspect with emergent cursive 'lower case' letter-forms" (Brown & Lovett, The Historical Sourcebook for Scribes). I.e. these scripts are the first that show some of thr lower case letter-forms we're familiar with now. So, between different regions and cultures across europe, the letters of the roman alphabet are changed and developed over centuries into variety of forms. All of them are based on the same alphabet so they are recognizable but different scripts are particular to different uses or time periods but new scripts are built on the basis of the scripts that came before and eventually the whole beautiful mess gets codified with the printing press and the decline and fall of the manuscript.
Now, obviously, while these scripts are being developed, grammer and puncuation are similarly being developed and evolving. Punctuation is particularly interesting because it's invisible in the spoken language but incredibly important in conveying appropriate meaning in text. Punctuation has really only been universally codified since the printing press and even that took some doing. As you can imagine, inconsistent punctuation and the lack of puncuation can be one of the most overwhelming and intimidating aspects of analyzing handwritten manuscripts. These challenges aren't unique to modern historians and the contemporary writers of these manuscripts understood the need for visual cues to help their readers. This is where the large and ornately illustrated letters in illuminated manuscripts come from. They provide a grammatical function that signifies importance (usually the beginning of a new subject, like a new parapgraph). These ornate letters aren't just found in museum grade illuminated pages but in more "common" writing as well (albeit, not as fancy). As writing develops, these larger letters develop special forms in many scripts and eventually become modern capital letters.
So the TL:DR is that larger ornate letters developed before the period in the written language and denoted the beginning of a new subject, and later the start of a new sentance. For whatever reason, as the period came into common use, the ornate first letter also continued to be used as a redundant puncuation system. The standard capitals that we know now are the result of various scripts developing over centuries that all borrowe heavily from one another and became codified with the printing press.
Source: a History of the written language class, and "The Historical Source Book for Scribes," Brown, Michelle & Lovett, Patricia, University of Toronto Press Incorporated, 1999.