"When we were going to go to the hospital, the car broke down."
Translation:När vi skulle åka till sjukhuset gick bilen sönder.
This will sound weird at first, but think of it as a past version of the future tense.
So it was basically what you were planning on doing, but now your plans have changed. A little bit how "thought" is used in English, yes, it's the past tense of "think" but it's used to talk about your misconceptions about the future.
"I thought you had a day off tomorrow"
In Swedish you can do the same thing with the word "will" (skall/ska). "Skulle" is technically the past tense, and then it could be translated as "should", but when you talk about future events the English translation becomes more complicated "skulle du inte ... ?" becomes "Weren't you going to ... ?"
Is the definite always used after "till?" Han gick till skolan, till sjukhuset, till universitetet, till kyrkan, etc.?
In English if I went to church that probably means I attended a Sunday morning service. If I went to the church, I traveled to the building. Any such distinction in Swedish?
There are, in fact, two errors in that sentence. Let me try to explain what your sentence would sound like to a Swede:
"When we should walk to the hospital, the car became asunder"
Firstly, the use of "gå" indicates that your intention was to walk towards the hospital, instead of driving there. But if you walked, the car could not have broken down. Therefore "gå" should be replaced by "åka", as in "När vi skulle åka till sjukhuset(...)". This is a common mistake to make. I guess it may be due to the similarities in pronounciation between the English word "go" and the Swedish word "gå".
Secondly, "blev bilen sönder" is simply put an incorrect use of the verb "bli/blev" and the adverb "sönder". In this case, "sönder" should be compared with the English word "asunder" instead of "broken".
"Blev" is the preterite tense of "bli" and is never used in combination with the verb-particle "sönder". There are no conjugations of the word "sönder" in Swedish. It would be better to compare it with the English word "asunder" rather than "broken". The word "trasig" would be a better translation of "broken", especially since both of those words are adjectives.
blev = verb bilen = noun sönder = adverb / verb particle
A tip is to look for a pronoun in sentences where you feel you may want to use the word "blev". Example: "jag blev gravid", "han blev sen", "hon blev glad" (I got pregnant, he was late, she became happy).
Using "blev" in combination with an adverb (such as "sönder") is rare and would, in most cases, sound foreign. However, it may be used after a noun when used before past principle. It may also be used in combination with an adjective.