If your seeds germinated and then the seedlings suddenly started dying then it is likely that it was damping-off that killed them. Damping off is caused by a fungus and can kill off a large number of seedlings. You could be over watering, aim to keep the soil moist and not let it dry out but at the same time ensure that the soil isn’t wet. If you are going to plant more onion seed then start off in a fresh tray to avoid contaminating the new seeds with any fungal residue. Don’t plant too many seeds as overcrowding will help the fungus spread and don’t plant them too deep as you want to get them to grow quickly so that they are not as susceptible to the fungus. Have a look at the propagation information on the onion page if you haven’t already, about 0.5 inches deep is good for onion seeds.