We debated at some length having the explosions be silent in space, because of course sound doesn't travel through a vacuum. But in the end we decided to go with the Rule of Cool, and have sound effects anyway. It's Star Wars, fer cryin' out loud.
There is, by the way, for anyone who doesn't know, a canonical explanation for how space fighter pilots can hear stuff going on in space around them. In the novelisation of A New Hope (or simply Star Wars as it was titled then) - the very first Star Wars thing ever published, yes, even before the movie - Han Solo explains to Luke Skywalker:
Your sensors'll give you an audio simulation for a rough idea of where those fighters are when they're not on your screen. It'll sound like they're right there in the turret with you.And you know, when you think about this, it makes a lot of sense. Sensors should be able to detect stuff flying around outside your field of view, and what better way to present that information to a fighter pilot than to generate a simulated audio field which accurately portrays the spatial location of things you can't see? Several other science fiction authors have used the same concept.
Transcript
R2-D2: Let's do a spin, that's a cool move.
GM: R2, you detect incoming fighters on your tail.
R2-D2: Incoming fighters on our tail!
GM: Okay, you've been getting away with this long enough. That's definitely in character. Beeping only.
[SFX]: < doing bing bak-jing >
Anakin: What's that R2? Timmy's trapped down a gravity well?
R2-D2: Ha. Ha.
[SFX]: Kaboom! {R2 blows up a fighter}
Ric Olié: That's a hit!
Anakin: How are we going to get the Orb?
[SFX]: < bip bing poppity >
Anakin: What was that?
Ric Olié: It sounds like he's beeping in droid language!
Anakin: You want me to eject you into space?
[SFX]: < boop! > < boop! > < boop! >
Anakin: So that's a yes?
[SFX]: < BOOP! >