How can comets have tails if there's no air resistance in space?
I understand that solar radiation causes material to vaporize out of a comet into dust but why does the dust then trail behind the comet like a "tail"?
Assuming gravity is the only applied force acting on the comet, shouldn't all of the material, including the dust, be travelling at the same speed due to conservation of momentum? What causes the dust to travel slower than the comet's nucleus? In other words, why does the dust form a "tail" and not a "cloud"?
There are two forces that can cause the formation of a tail: the solar wind and radiation pressure.
The first misconception in your question is "the dust [travels] slower than the nucleus". The tail is not left trailing behind the comet, it is pushed away from the comet by the sun. When the comet is moving away from the sun, the tail is in front of the comet.
Now radiation pressure is small but real. When light shines on something there is a small force. This pushes dust back from the comet in the direction opposite to the sun. The dust is still affected by gravity and a curved dust tail results.
The ultraviolet light from the Sun ionises the gas and gives it an electric charge. The solar wind carries magnetic fields and the gas (or more properly plasma) follows these fields in a straight line back from the sun.
So space around the Sun is not empty. There is powerful light and magnetic fields that are strong enough to push the dust and gas released by the comet away from the coma, and form the tail.
this has got me thinking; Why do particles from a comet that result in meteor showers spread out mostly along the comet's orbit? and reminded me of your earlier answer.
Oh, I did not see this question earlier. @uhoh mind that the visible part (tails) as described here and the meteors the other question is about is about different particle sizes mostly (though there's an overlap in the >µm region)
The magnetic field lines are not in a straight line back from the Sun, so the plasma does not go in a straight line back from the Sun, it will follow the magnetic field lines. That's why there are two tails (see Viktor Mellgrlens answer).
@gerrit yes. One can actually imagine it such in a near-perfect plasma: the particles drag the magnetic field along with them from their origin. But as the sun rotates, subsequently emitted solar wind particles will drag the field from other parts. Given the finite speed of the solar wind it results in the magnetic fields line being 45° wrt Earth's orbit at 1AU
First, there is not just one tail, it is several, but when traveling far from a star, they are "aligned". When it gets closer the different materials behave differently, both depending on the temperature they start to vaporise and how they are affected by solar winds.
I think this picture shows it in a good way.
As far as I can find all credit points to NASA, there is also a copy at NASA's website without attribution and an SVG conversion on Commons, with the uploader as creator of the conversion but citing NASA as author.