Why does Naegi call Togami "kun" and Aoi "san"? In Japanese, "kun" is more casual and usually used for friends or those on the same level or lower in the "hierarchy" while "san" is more formal and used for those higher up in the "hierarchy" (older, in a higher grade at school, or in a higher-up position in the workplace.)

It seems that Naegi is a lot closer to Aoi than Togami. He spends a lot more time with her in Danganronpa the Animation and is together with her the whole time in Danganronpa 3: Side Future. They are also in the same grade.

It seems to me he should be calling Aoi "chan" and Togami "san" if anything.
Japanese honorifics can be confusing to non-Japanese (personally, I was still confused when reading this question). However, other than the suffix (-san, -kun, etc.), which part of the name is also (if not, more) important. Note that their full names are Byakuya Togami and Aoi Asahina (given name - surname).

By calling Byakuya Togami as Togami-kun, it means that Naegi respects him, but their relationship is not that close (using family name). Kun, in this case, is used to refer men in general (or, male friend). Probably, he didn't call him Togami-san because it's too formal.

By calling Aoi Asahina as Aoi-san, it also means that Naegi respects her, and their relationship is closer than between Naegi and Togami (using given name). San, in this case, is also a respectful way to refer anyone (kun can also be used to refer women, but it's more a rarer and special case). As for why he didn't call her Aoi-chan, it's probably because they're still not that close, not until he found her endearing.

Although the question didn't ask, the more confusing thing is why Naegi calls Kyouko Kirigiri as Kirigiri-san, despite their closeness and also love interest. One can suggest that because he respects her more than anyone, but can't get closer in relationship. Naegi once tried to call her cute in Danganronpa (the game, in Another Story), and she acted embarrassed at first, but soon it was revealed that she was actually fooling him. Considering that she looks tough, more likely a tsundere that doesn't easily show her dere side, Naegi was having a hard time to feel closer to her.