If you have just started your system and put fish in, it may be the shock of a new environment that caused them to die. If your fish are used to warm climates but your water is too cold, that could also be a factor. If you have not added bacteria to the system yet, ammonia isn’t being converted into nitrate for your plants to take up; therefore, the ammonia buildup may have killed your fish. Overcrowding the fish tank can also stress out fish and cause them to die.