I get that they're aliens, and I could grasp the idea of their consciousness or "soul" being contained within it, but what is the "spark" actually made of?
I think it's made of Energon,the esence of Primus(except where Primus doesn't exist in that universe)
well, as it's fictional, it CAN be made of whatever you WANT it to be. i like to pretend its a combination of Electricity, Ice cream, and ignighted propane. Trolling aside, it's likely some form of living/sentient electricity.
You're going too far with it. It's merely an analogue for the "soul". Everything about them is analogous to human beings. Eyes, nose, ears, mouth, teeth, tongue, tonsils, "breathing" / coughing, breasts, facial hair, ect, right down to the bipedalism with a head on the top. None of it is necessary for "mechanical" lifeform's. It's just the "way in" for the audience. A way for us to NOT think of them as robots. Something about the property that flew right over the moviemakers heads and why we're getting such human-centric "Transformers stories" out of Hollywood.
Magic. Or the energy thing works, too. In IDW they're naturally-spawning things that come from Cybertron itself.
Sparkles and happy thoughts? You could always say just pure energy or whatever, or they're masses of Energon.
Sugar, spice, and... no that's something else. Seriously though, my favorite idea is that transformers are energy beings which are their sparks and they can't live more than a few seconds outside of their mechanical bodies. Hence, when a transformers body suffers substantial damage, the spark extinguishes unless it is very quickly moved into a new body as in beast wars and animated. Some sparks are mutations which can survive outside the protection of a physical body like starscream's.