Hi there!
Though the record is undeniably spotty, we're lucky to have as much information as we do about the Roman emperors. There's certainly a lot missing, and we probably have only a fraction of what was originally written available today. Most of what we have comes from ancient historians living in the empire, mainly in Rome and Greece. While not all, a great deal of our information on the Principate (I'm assuming that this is the period you're mainly asking about) comes from a few key writers: Tacitus, Suetonius, Cassius Dio, and Herodian. Of course, there are many, MANY more authors we gather material from, but I'm going to focus on these four. As far as we know, they gathered information in many different ways, from word-of-mouth, to research with available texts, to personal observation. Some writers had connections to powerful political actors or were themselves, but this is not always the case. Others were commissioned by sitting emperors or rich patrons to compile histories, but again, not always. The Romans were meticulous about record-keeping, so there was no shortage of information to draw on.
The early imperial period is largely covered by Tacitus in his works the Histories and the Annals, providing a chronological overview, among other things, the emperors from Augustus to Domitian. His accounts of the Julio-Claudians and Flavians form a significant portion of the basis for secondary sources. His writing is often drier and more factual in nature than that of his contemporaries. Because of this, Tacitus is often considered to be less biased than others, but the nature of ancient sources necessitates a critical eye. For all the value of these texts, significant portions of both have been lost, making it largely incomplete.
While they covered many of the same subjects, Suetonius offers a more editorialized account than Tacitus. The information is more bombastic and scandalous, but his Lives of the Twelve Caesars has been a cornerstone for biographical information on the Julio-Claudians and Flavians. He's the source for many of the personal anecdotes we have about these rulers, most of which are exciting, but ultimately problematic in their sensationalism. That said, his work still provides valuable insight into the attitudes of the time and the Romans' perception of their recent past through rumor and propaganda.
Few full and reliable contemporary sources survive from the Antonine period, as this is when historians like Tacitus and Suetonius were doing most of their writing. As such, it can be assumed that these authors were hesitant to comment on their own emperors. It's likely that at least some histories were created and eventually lost, but we see little reference to them in later works. The main evidence we have of these Antonine texts is the inclusion of information presumably from these works in later writing.
For the later imperial period, we have Cassius Dio and Herodian as the main historians. Cassius Dio provides much of our information on the Antonines in the Historia Romana, as well as detailing the reigns of the Severans. His work spans the entirety of Roman history, making it one of the most expansive texts on the subject. Like Suetonius, there is some degree of exaggeration and heightened narrative, but his work is supplemented by that of his contemporary Herodian, writing soon after the fall of the Severans. His Roman History discusses Rome after the end of the Pax Romana and into the Third Century Crisis. His accounts are valuable in their own right, but also help be either disputing or corroborating Herodian's claims.
(A couple disclaimers: Nearly all ancient sources are incomplete to some degree, and many are missing, making it difficult to tell how much we actually know. Additionally, primary sources are subject to strong author bias, so again, it's impossible to tell exactly how accurate these sources are with nothing to compare to.)
Here's links to the sources I mentioned!
Tacitus (Annals and Histories)
Suetonius Lives of the Twelve Caesars)
And some further reading:
Writings can be from several sources. Firstly, contemporaries, which mean people who live at relatively the same time as each other. Or it can be from non-contemporaries, people who write [hopefully from actual sources] about times and people outside of their lifetime or relative era.
Examples of potential contemporary sources, if the writing in them was from the time period applicable to what they write about: diaries, newspaper articles, books, tax ledgers, financial records for houses, licenses and certificates, proclamations, announcements, advertisements, poems, songs, etc...
Those sources can also be non-contemporary, obviously, but records you wouldn't necessarily think of can give a lot of insight into an era or individual.
For example, if you review the expenses of the household of a noble you can see things like: what food he eats, what food the servants eat, what food then is 'typical' of the era, the materials purchased, clothes purchased, merchants or stores of note, etc...
If someone said Caligula bought 100 horses and painted them blue, and you managed to find an ancient expense record showing a purchase for 100 horses and a large quantity of blue paint, that's potentially an evidentiary source to write about. Whether you write about it contemporaneously or not.
The information we have on Romans doesn't all come from Romans either.
If we look at Tudor history, some of the best contemporary accounts of events at court of Henry VIII come from the records of letters from the Spanish Ambassador Eustace Chapuys.
Visitors to Rome, be they merchants, dignitaries, or otherwise, could write about or speak of their experiences and become sources for contemporary records. Territories that battled Rome or became vassals to Rome left records of interactions, and vice versa, whether or not they are available today.
Certainly there were individuals who wrote actual historical records, however biased, and they were sometimes contemporary and sometimes not.
Julius Caesar kept meticulous log of his activities, so he's a contemporary source to his own story and what was going on in Rome at that time.
A famous historical record of Roman emporerers called The Historia Augusta is not a contemporary source but isn't modern either. The true origins are debated, and some researchers think the book is more fiction than fact but the collection is significant enough and tantalizing enough that it's still looked on as a Roman record source. We can't prove unequivocally how accurate it is or isn't, at this point.
Some well-known historians who contributed famous records [either as books or letters] are Suetonius, Plutarch, Pliny the Elder, Pliny the Younger, Cato the Elder, and Tacitus. Although there were many more, and again, their contributions could have been as 'simple' as prolific letter writing that detailed current events, including emporerers, in their time.
Different emporers have more records in the present day than others, but ultimately our information comes from a collection of puzzle-pieces of source material that historians over centuries have collated into one big ever-changing history.