"All the parameters in my tank are perfect and this fish has been healthy and well for as long as I have owned him, but I came to switch the light on this morning and he was dead. What’s happened?"
Of all the questions in fish keeping, this is the one that's asked the most often and it often goes without a simple answer. Firstly, it's worth covering the basics - when you lose a fish, the water parameters, tank community, diet, husbandry and recent new fish purchases must all be taken into account. Your local store can help in this situation and if there are any issues, they will help identify them and get you back on the right track. However if all of the above factors have been properly met and there is still no culprit, then the option remaining option is what is known as "Sudden Fish Death" (SFD).
SFD can better be explained when considering the biology, physiology and genetics of the fish. Remember, that as a rule, most bony fish reproduce in vast numbers. Anyone who has kept guppies or platys can confirm that, but these large broods very rarely all reach adulthood. This is because the genetic variation between all of the fry is vast. Some might have been born with deformed livers, missing bones or poorly-formed hearts. These fish die rapidly when birthed or spawned and rarely go further than creating a handy meal for a scavenger or filter feeder. Fish reproduce like this to allow them to exploit fluctuations in their environment. In a good year, a large number of fry will succeed and the population spikes, while in a bad year, producing so many offspring ensures that at least one might survive.
Fry which don’t die within the first 24 hours are not necessarily free and clear either, as they could well carry longer-term ailments that will only strike later in life. This could be months, years or even decades later and is no different from a human experiening a heart attack caused by a previously undiagnosed condition. Genetics thus affects fish as much as any other creature, but thankfully fish that breed in smaller numbers and that come from decent brood stock and reputable stockists will often have much longer and more reliable life spans.
It's worth understanding this phenomenon as it sometimes causes good fishkeepers to become paranoid, searching for a reason as to why their prized cichlid, tetra or barb died. However, once you rule out all the normal factors such as husbandry, water quality etc. you are left with SFD. Extensive post-mortem study might reveal the presence of a virus, bacteria or parasite that most have never heard of before, but these factors remain the mystery of fishkeeping. Science may one day be able to explain all of the ins and outs of SFD, but in the meantime its best to simply enjoy your fishkeeping and chalk up your loss to experience.