Socrates was popularly, and mistakenly, identified with nature-philosophers. These so-called Presocratics sought to replace mythic explanations of events in the physical universe with rational and scientific explanations. As you can well imagine, this was adamantly opposed by the religious fundamentalist of the ancient world, one of whom was the prosecutor Meletus, who preferred the literal interpretations of Greek mythology. To them, suggesting that their were meteorological explanations for thunder and lightening rather than the anger of Zeus, to take just one example, was blasphemous! Although Socrates had been associated with such schools of thought while a youth, by 399 B.C.E. it had been decades since he had pursued such interests. Nevertheless, by making the association the prosecutors hoped to condemn Socrates as they had other natural philosophers, the most famous case of which was Anaxagoras.