Two possibilities immediately come to mind, thought I'm sure there are others.
1). The fish was startled by something and went head first into the glass with enough force to kill it. This doesn't necessarily show damage and is suspicion #1.
2). The fish had a genetic defect of some type and suffered sudden major organ failure, such as a heart attack.
Neither of these things is real common, but they do happen. I would keep an extra close eye on the remaining fish for awhile in case this fish did have something going on earlier and you just didn't notice it. Sometimes we all miss subtle changes, just a good idea to be cautious at this point.