1) Why "in einem Musical" but "auf/bei einer Demonstration", "auf der Berlinale" and "auf einer Hochzeit?
There is no answer to a why-question for the use of prepositions. You have to learn by heart which places/situations are expressed with what preposition. I.e. you should learn correct sentences to serve as models for other sentences you may want to say in other situations in life.
2) Why "in der Nacht" but not "an der Nacht"?
Same answer. Also: Why "auf dem Bahnhof", not "im Bahnhof"? There is no deeper logic. You just have to accept the tradition. In English, why is it on Monday, not at Monday?
3) Can I use "während des 3. Semester" instead of "im 3. Semester"? Similarly, is "während eines Fußballspielen" an acceptable alternative to "beim Fußballspielen"?
You can say während des dritten Semesters (but mind the -s for genitive!), but the use of that phrase would be different than im dritten Semester. You can say
Ich bin im dritten Semester.
Ich habe während des drittens Semesters hauptsächlich Urlaub gemacht.
But you cannot say
[WRONG] Ich bin während des dritten Semesters.
4) I'm also a bit confused about nouns' endings in dative. Do we always have "zwischen zwei Filmen" and "vor etwa 10 Jahren"?
Your examples are correct. What do you mean by "always"?
Note: It is better to restrict a question here to one single topic. If you have four different problems, post four separate questions.