"They were thinking about their children."
Translation:Ils pensaient à leurs enfants.
Unfortunately there is not, especially when it comes to verbs that can use either preposition to change their meaning. It's best to learn these verbs individually with their preposition.
- penser à = to imagine, to consider
- penser de = to give an opinion about
In a sense, English is the same way. Take, for example, the verb "to get." Add a preposition and you get a lot of different verbs: get by, get along, get around, get to, get from, get in, get out, get for, get off, etc.
Because that's not the imparfait/imperfect tense. That'd be passé composé and implies the action happened and then ended. The imparfait ("were thinking") implies the action was a continuous one. They kept thinking about their children and not just thought about their children for a second then stopped suddenly.