If I (US citizen) come into Istanbul on one airline (Turkish) with a checked bag, and then fly out later to Kazakhstan from the same airport that day on a separate ticket on another airline (Astana), do I have to go through customs and immigration to get my suitcase and go back through the departure screening process to catch my other plane? Is a visa necessary just to do that, even if I am not leaving the airport? My layover time is about 6 hours
You don't need a visa if you stay in the international transit area. But in order to collect baggage and check it in to a separate flight, you must go through immigration and customs to enter Turkey, then collect your bag and check it in with the next airline, then go through immigration again to exit Turkey. This is how the process works nearly everywhere in the world.
In that case, you will need a visa. US citizens can obtain a visa on arrival, but this takes quite a bit of waiting in line and can eat a good chunk of your six hours. To save time, get an e-visa in advance (and take a printed copy with you). You can then go directly to immigration rather than having to spend a lot of time and frustration getting the visa on arrival.