Panting can simply be caused from overexcitement, (when we moved Uabassoon's cat Corkscrew home from my house he kind of hyperventilated and started panting like crazy. He eventually calmed down and it was no problem).

They can also pant simply if it's too hot, and it is one of the first signs of heatstroke. So if the cat doesn't stop panting and exibits any of the following, it may be a good idea to get him to the vet:
-Anxiety, possibly demonstrated by pacing
- Increased heartbeat
- Respiratory distress or hyperventilation (Breeds with flat noses may exhibit this earlier because of compromised airways.)
- Dark red gums
- Lethargy
- Increased internal body temperature