The greater the pressure difference between the inside of a container and the air on the outside of it, the more likely it is to explode. The low air pressure in an aircraft's hold means that the pressure difference is greater than when the container is on the ground. So, theoretically, there's an increased risk of explosion.
However, aerosol containers are designed to withstand the pressure difference of being placed in a total vacuum, so the actual risk of explosion is very low. (i.e. the risk of a
faulty container exploding is increased but, as far as normal aerosols are concerned, there's no real risk).
Even if a faulty aerosol explodes in the hold of an aircraft, it doesn't pose any real risk to the aircraft's safety. (It will make a mess of your suitcase and its contents but it won't damage the structure of the aircraft). For this reason, most aerosols are
not banned from being carried in the hold of an aircraft. For example, see Ryanair's rules, here:
http://www.ryanair.com/site/EN/faqs.php?sect=b ag&quest=prohibitedchecked
However, as will be seen from that link, containers holding flammable gases (such as cartridges for Braun hair straighteners) or bleaching agents (such as some hair care products) are prohibited.
The safety rules are common to all airlines (although a few carriers might choose to prohibit additional items) so, for completeness, I'll include Ryanair's information on items prohibited inside the aircraft's cabin, together with the current additional security rules on cabin baggage. (If you read all 3 links, you'll know exactly what you can take and where you can put it):
http://www.ryanair.com/site/EN/faqs.php?sect=b ag&quest=prohibiteditems