Stirling Engines, like all heat engines, generate work by tapping the transfer of heat energy from a hot source to a cold source. For most combustion-driven engines, the hot/cold dichotomy is created via the combustion of some fuel. This generates a point source of heat, and the cold source is just everywhere else. The Stirling Engine doesn't necessarily need a combustion source, but it does need heat, and it does need cold. This is where the troubles will exist for an engine in space.
Space lacks very much heat, but it would be a stretch to call it cold. In a nutshell, this is because there is no medium to carry any heat energy. As a result, if we had a Sterling Engine in space we could heat one side of the machine to create the hot potential, but we would have to rely completely on radiative cooling to create the cold potential. This is not to say it wouldn't work, mind you, just that we're working with a more limited set of possibilities.
From a practical perspective, we could probably mount a low-differential Stirling on the outer skin of a ship or station. The heat of the station is already radiating away, so the Sterling would effectively recapture some of that radiated heat energy and turn it into mechanical energy. The question is why. Why do we want to do this?
Mechanical energy aboard a spacecraft will have little use, but not zero use. If an electrical generator was being powered by the engine, it would essentially be turning the wasted heat energy of the station back into usable electrical energy. That's not nothing, but it isn't exactly much. The efficiency of this process will be low, and the total output will also be very low. Overall it might seem desirable to save some of the wasted heat energy, but there is also the total weight of the engine itself, which will be considerable. Getting the engine into space will expend massive amounts of energy, and it would probably not be worth it, unfortunately.
I can't recommend the use of a Stirling Engine in space, but it would probably work if you wanted it to.