There is both *on the ballat and *write-in eligible. They are generally 2 separate issues.
It would seem being on the ballot would be necessary to have a chance at getting enough votes to win a state. The parties have made it difficult for write-in candidates to gain much traction; they've even made it tough for 3rd parties.
I wouldn't say that it's an impossible task, but the track record of independent or 3rd party runs is pretty scarce with success stories, especially on the presidential level. I believe Murkowski won her Senate reelection as a write-in, but hers was a rare case.
Even Teddy Roosevelt, a former president, fell far short of beating the two parties in 1912. (He did trounce the GOP candidate, though).