How utterly sad for you that this has happened. It`s not easy to say why two young hamsters would die so suddenly within a short space of time if they seemed happy the previous evening. I can only echo what de4life said and put it down to bad breeding and illness. What you might want to do is go back to the store the hamsters came from and go to the same tank and see if the other Syrians they have are all okay and report this sad episode to the store staff or owner. They may not be aware that these youngsters could be ill and they should check their stock and their habitats/diet for any signs of contamination. Even the water. I would also ask them if they have had any deaths occur in the past few months or reports of any from people who have purchased Syrians from them. Although I doubt they would say yes to this to cover their backs if they did know.
And yes, Syrians are solitary hamsters (meaning they should be kept on their own once sold as babies). Chinese hamsters are also solitary in most people`s eyes because they are sometimes sold in pairs as well and this is bad advice.
At home, check their cage, the room they were in, the heating (or temperature) in the room and if you have other, larger pets who may have been an influence (causing stress like cats?)
Very sorry for your losses, it must have been horrible to find them passed away.
But having a single Syrian (from another source) might help ease the pain once you have had time to look into this. x