Can food be preserved in space?
Technically yes, since the general objective of food preservation is to prevent biological spoilage, which certainly happens in the cold vacuum of space. While there are many microbes that can survive in space there are no known microbes that can thrive(reproduce/multiply) in freezing 0 pressure conditions (it's like a freezer on steroids).
However, it would be exposed to a lot more direct radiation which if then brought back in for consumption could have a direct path into the body. If it is exposed to sunlight it will literally cook and outgas water mostly but also greatly accelerate the breakdown of various organic compounds thus reducing its nutritional value. That is if the container they are in doesn't explode first.
There is also the inconvenience (and efficiency loss [power & atmosphere]) of having to open the airlock every time someone wants a snack.
Edit: Since for some reason this very logical flow needs backing up:
An argument against food irradiation
The above is a decently supported argument against the irradiation of food, though far from an ironclad research paper. While it is far from an ironclad research paper I do want to point out that research on many past food safety practices are beginning to reveal longterm negative consequences of them. It's a very grey area at the moment. The article is also arguing against commercial irradiation practices which are very controlled doses. The point I wanted to draw upon was that there is already some evidence that controlled irradiation of food can be harmful, surely the uncontrolled ionizing irradiation of unshielded food in space must be even more so. This does not mean I claimed that it would be outright toxic it just means there could be a greater chance for it. I think to definitively prove anything on this aspect would require someone to float something like a banana in space for a year, bring it back and then do a comparison on compounds present.
As for nutritional loss, that happens with about every preservation method and will certainly happen here, especially if exposed to sunlight and radiation. But this post of mine has some decent links too.
NOTE: The physical construction of the container that would store said foods also has a large impact on some of the points made here. However, this aspect is technically outside the realm of the question. It should be noted that a design that enables retention of pressure could actually support microbial growth rather than inhibit it.