I believe they already do use these thermocouple generators in space. If not from the sun, then from the heat of a nuclear battery.
There aren't very much atoms in space (I don't know exactly how many, but I believe less than in an ultra-high vacuum). There's plenty of oxygen on board a spaceship. The problem is that it combines with other elements as we breathe. However, as long as we don't throw these compounds overboard we can recycle them by breaking them apart again. That's what life support systems already do. It's surely a more efficient way than trying to capture the almost negligible atoms present in space.
Although, the concept has been suggested for powering super-fast spaceships (see Bussard ramjet). I guess the idea was that if going close to the speed of light, even the minute molecules present can be harnessed for some form of space-jet engine. Still, the concept involved using kilometer or thousands-kilometer scoops. It was meant to work in interstellar space, which is even more void than close to earth, but still...