(Note that this post was written early in the life of the game is likely out of date.)
In theory you can just keep reviving any explorer that dies in the wasteland to keep them out exploring indefinitely. I had an explorer out over 200 hours (more than 8 days) this way. However explorers can only carry 100 items, and they'll reach this limit long before that. With the latest patch explorers automatically stop exploring and start heading home once they reach 100 items, so it's no longer possible to have an explorer out this long.
Maximum Time Exploring
An explorer will collect 100 items after 3 to 4 days of exploring, so the current maximum time is about 100 hours. Since having higher stats means that the explorer will find more items, its actually the explorers with the lowest stats that can stay out the longest.
Maximum Time Without Dying
To maximize the time an explorer can survive in the wilderness without dying, you need three things. High hit points (HP), a high damage weapon and 25 stimpacks. To get explorers with the most possible HP you need to raise their endurance to 10 while they're still level 1. You then need to equip them with the outfit that gives them highest endurance bonus (ideally +7, but +5 is probably the best you'll be able to manage), and then start levelling them in the wasteland. Once they're level 50 and equipped with a good legendary weapon (20+ damage) they have a decent chance of surviving 100 hours in the wasteland without dying.
(Actually, sending them out before they reach level 50 can increase the amount of they survive in the wasteland. This is because levelling up restores the explorer's HP without using a stimpack. I'm not sure what the most optimal level is, but you can only do this once per explorer so it doesn't matter too much.)
Maximizing Item Quality
Length of time exploring does increase the quality of the items you'll find. However even after 200 hours my explorer was finding mostly junk. So it never gets that good. The one possible exception is a specific encounter that explorers will find after about 60 hours (2 days 12 hours) of exploring, the National Guard Depot. I've never gotten anything better than a "rare" blue item from this encounter, but others have reported getting legendary (gold) items from it. So you want to have your explorers out for a least 60 hours to have the best chance of getting the best items.
Recommended Strategy
At the start of the game, don't worry about any of this. Just send out explorers to get whatever stuff they can. Once you've unlocked endurance training rooms, fill them with level 1 dwellers and raise their endurance stats to 10. Then make those dwellers your main explorers. You should raise their other stats eventually, but once they've levelled up and you've equipped them with a good rare weapon (15+ damage) they should survive long enough to reach the National Guard Depot.
There doesn't appear any point of exploring beyond the National Guard Depot encounter. I always recall my explorers once they're past it. The sooner they're on their way back home, the sooner they can be sent back out for another chance at the depot. With the new limit of 10 explorers in the wasteland this is even more important.
So in other words, 60 hours is the amount of time that has to pass for you to get the bust stuff from exploration.