For a tire with a tube to explode the tire must have failed to contain the tube. This usually happens two ways:
- The tire slipped off the rim (most likely)
- The tire structure allowed uncontrolled expansion of the tube (a hole in the tire)
I suppose it's possible to blow through the rim but there would have to be serious easily visible damage to the rim to allow this - very unlikely.
For a tire with no other issues (correctly installed, properly inflated and good tire integrity) sitting in the sunshine will not make the tire blow.
If the tire was not seated properly, over inflated or marginal tire integrity but still working, warming in the sun may exacerbate an existing issue and allow uncontrolled expansion.
Bottom line: Check your tire for damage. Install a new tube, make sure the tire is seated correctly and ride on.