he alisema that he hated her because she could have ruined everything that carlisle had tought him in one bite. it was hard for him to not bite her, so he had to stay away from her and send her a bad vibe, hoping that she would stay away.
in midnight sun, edward says that he is mean at bella because of her scent that makes her so irresistable to him. he feels that she is about to ruin what he has been working on for almost a century; not to bite a human. he feels he is going to betray carlisle and his whole family because of her. later on, at the hospital, he is being so mean to her because he wanted to make her hate him, so to make it easier to avoid her. later on though, he realises how important bella is to him =)
Edward is mean to Bella in the beginning of Twilight because he wants to...bite her soo frickin badly! She smells so good to him and he's frustraighted because of that. Also he's mad because he can't tell what she's thinking and that's never happened before. This is the reason for Edward disappearing that week at school. But it explains in Midnight Sun that he comes back because 1. he is ashamed that he ran from a human, and well this probably isnt a reason but 2. he loves her!!