It could be that there was a prophecy or a hidden message that led Harry to a dangerous place. He might have followed it without realizing the full danger. His disappearance could also be part of a plot by some magical creatures who wanted to test his abilities or get something from him. Snape, being a skilled wizard, might be the only one who could track him down due to his knowledge of dark magic and the Hogwarts grounds.
Perhaps Harry was investigating something related to Voldemort on his own and got in over his head. He could have been captured by Voldemort's followers who were hiding him away. It's also possible that a magical spell backfired on him while he was practicing magic in a secluded area and it made him disappear, only to be found later by Snape.