Translation:She was at his side when he had problems.
"hun var ved hans side når han havde problemer" Refers to a non specific situation, so she would be there whenever he would encounter problems.
"hun var ved hans side da han havde problemer" Refers to a specific situation, where he did have problems, and she was by his side.
Good to see this comment!
So "når" corresponds to German "wenn" (in the sense of "wann auch immer"), whilst "da" corresponds to German "als" (referring to a single, specific situation). - Most likely hard to understand for native speakers of English, French and many others.