Why do my clothes smell when I dry them outside on line but they are fine when tumble dried?
Smells generally come from bacteria which thrive in a moist environment. A dryer heats up clothing to the point where most of these bacteria are killed off. 

It's possible that the bacteria is coming from your washing machine, if you usually do cool or cold cycles and haven't cleaned it out in awhile then it is a breeding ground. Try running an empty load at its highest temperature, or better yet running an empty load with a washing machine cleaner to get it gunk-free. That should get your washing smelling fresh when using a line.