[deleted]
In most cases, it's because someone wrote it down. We know Julius Caesar died on the Ides of March, during the Year of the Consulship of Julius Caesar V and Marc Antony (15 March, 44 B.C.) because the writings of Plutarch and Suetonius survived.
Isaac Newton's tomb in Westminster Abbey, Here are some good pictures of it, along with a translation of the inscription. The date of his death is written in the Old Style as 20 March, 1726, because England still used the Julian calendar (instituted by Caesar in 45 B.C.), and the new year didn't start until 25 March. So, in the Gregorian calendar, he died on 31 March, 1727.