(1) One simple "rule" that often works is:
(a) use "when" for shorter actions.
(b)use "while" for longer actions.
(2) Maybe (maybe!) your first sentence could be something like:
Last week, when it was Christmas, I flew home to visit my parents.
Perhaps you might consider: I flew home last week during Christmas to ....
(3) Possibly your second sentence might be: It was raining while I waited for the bus.
Have a nice day!