Why does Mikoto attack Touma? In the first episode of To Aru Majutsu no Index, Misaka attacks Touma with her Railgun, but she deliberately misses him. After that she attacks him with her usual lighting attack but he nullifies it with his power. But why did Mikoto attack him? It's so unlike her to attack somebody that innocent. (Yes, she does always attack some people, but they usually pick a fight with her first.)
The two have met before Index, in Toaru Kagaku no Rērugan (A Certain Scientific Railgun) Misaka encountered Touma and his ability to nullify her attack with his Imagine Breaker in his right hand. When Misaka asked how Touma did it he says he doesn't know yet Misaka doesn't believe him. 

This annoyed Misaka because she's one of the strongest Espers in the city (one of only a handful of Level 5's) and she's proud of it, Touma is a "Level 0" so he shouldn't be any match for Misaka however she can't win against thanks to Touma's Imagine Breaker and without knowing how it works Misaka can't accept that she is bested by him.

In Index they already know one another, it's just that after Episode 6 of the Index Anime Touma acts as if he doesn't know her because his memory was wiped out from a feather that remained after the effects of St. George's Sanctuary when Index was in Johann's Pen Mode.