You didn't say what you need it for. Generally the 5th gen is better. But it's still a lot slower than the 6th gen.
By the way, I read about a some battery issues on the 5th & 6th gen caused by some ios releases, for that reason is why i'm watching an 4th gen ipod, but as I said, I don't know if the 4th gen, isn't recomended anymore for beigning too old or it's a cheap solution to listen music and watch (eventually) some videos.Any iPod should work if you just want to listen to music, but older used iPod touches may have bad battery life. If you don't care about app support, updates, or speed any iPod should be usable. The 5th gen does have a slightly bigger screen so that's something to consider. It's also should have support for more modern apps for a while.
I would only recommend the 4th gen if the cheapest price is your main priority. The 5th and 6th gen are both quite a bit more capable all around.By the way, I read about a some battery issues on the 5th & 6th gen caused by some ios releases, for that reason is why i'm watching an 4th gen ipod, but as I said, I don't know if the 4th gen, isn't recomended anymore for beigning too old or it's a cheap solution to listen music and watch (eventually) some videos.