First off, have either of you had sex before? If not, then her reason would be because you "popped her cherry" and she's not used to having someone inside of her. If she wasn't a virgin before you, you could have just hit or scraped the inner wall of her and sometimes that will cause pain. There are numerous reasons for that happening.
Secondly, about your erection...That is very common for some guys. I wouldn't see that happening due to the dark/light issue unless it takes your mind off of things. Sometimes when your mind is roaming other subjects and you are not "focused" you can lose your excitedness.
Hope that helps. Good luck.