If you understand that pneumonia is just another form of a chrest infection, but more severe.
I can only speak as a paramedic, but dizziness can have various causes from a drop in blood pressure to not having eaten.
Without a proper breakdown of your underlying state of health we can only guess as to what the reason for this was. As SCMT quite rightly suggests, and I would highly recommend, go see your GP.
Did you have any difficulty in breathing or shortness of breath prior to, or during this episode?
Had you eaten too soon or not at all before your session?
Given your age (no offence intended) and recent pneumonia, I would be very careful where any kind of chest infection, breathing issue or general health worry occur. Not meaning to scare you as I’m sure as someone who practices yoga you are generally in a good state of health, but pneumonia is one of those conditions often played down by people until they are seriously ill.