Hello~Sometimes if the shower is too hot, a person will faint, especially if it is summer and hot out already. When was the last time you ate, it could have been a blood sugar fluctuation and the heat exacerbated it.
If it happens again, I would certainly see your physician.
That used to happen to me all the time when I was younger, especially in the shower! Are you a young woman? My issue was that I was too thin, ate hardly any meat (and probably not enough calories), and I think had low blood pressure. Dehydration probably didn't help. Make sure your diet is balanced and that you're eating enough calories, check your blood pressure regularly, and consider visiting a doctor.