In cold weather it transfers heat into the cabin and hot weather it transfers heat out but it's mostly mentioned wrt cold weather because the energy hit there is higher.
You probably know this, but a heat pump won't make a difference with cooling because automotive air conditioners already
are heat pumps, we just don't usually call them that. The term "heat pump" is usually used when we
want the heat and other terms are used when we're
discarding the heat, but either way it's the exact same process. Also, heat pumps are typically bi-directional, so they can both heat
and cool, but that's not necessarily so.
To further clarify for the original poster... in internal combustion cars, we take advantage of their inefficiency to provide cabin heat. Ideally, we'd like all of the energy in a gallon of gas to go towards propelling the car forward, but that's just not possible. By their nature, every IC engine is going to generate a lot of waste heat that we need to get rid of somehow. In cold weather, we use some of that waste heat to warm the interior, making it effectively free. In an EV, we don't have (much) waste heat, so until recently most EVs just use some energy from the battery pack to heat a coil and blow air over it, just like an electric space heater. Electric space heaters have the advantage that they're essentially 100% efficient - all of that electrical energy is converted into heat. That sounds great until you realize that, measured in the same way, heat pumps are
more than 100% efficient - often much more. As Vwvkk mentions, heat pumps
move heat rather than generating it directly from electricity, which means that they can pump more heat energy into the car's interior than they expend doing the pumping.
The complicating factor is that heat pumps need heat to pump. As the outside air temperature goes down, heat pumps get less and less efficient. And each system will have a temperature below which it won't function at all. VW has said that their system works to a lower temperature than most, but it still has its limits. As the outside air temperature approaches that limit, a heat pump system will need to add in heat from another source (in a car, that would be the "space heater" style heat). This is why heat pumps are not typically used for residential heating in particularly cold climates (other than ground-source heat pumps, but they're a whole other thing). In those areas, you might find some homes with heat pumps that get a good workout cooling during the summer, but in terms of heating, they only get used in the spring and fall, when temperatures are cool but not cold. In the dead of winter, another heat source is required.
In an EV, adding a heat pump is not the slam dunk some make it out to be. In very hot or very cold climates, it doesn't make much sense to add the weight, cost, and complexity of a heat pump (it's worth noting that prior to the Model Y, no Tesla had a heat pump, either). My personal feeling is that the vast majority of the US is in the Goldilocks zone that's "just right" for an automotive heat pump, but VW seems to think otherwise. These decisions are never as simple as they seem from the outside. For all we know, they're supply-constrained on some part of the heat pump system. And even if adding a heat pump is the "right" decision, it's not really a feature you can sell to anyone but nerdy car geeks. You can sell additional range, but it's hard to sell "maybe some additional range during the colder months, but not if it's
too cold." The solution would be to bundle it into a package with a bunch of other stuff, but I honestly think the Statement package is already pushing it at $4,500. They'll probably have a little more pricing flexibility when Chattanooga production starts in 2022; maybe we'll get a heat pump then!