Germany
If we actually talk about criminal law, your question is answered by §§ 1 and 2 StGB (the German penal code) – official but of course not binding translation:
§ 1 [No punishment without law]
An act may only be punished if criminal liability had been established by law before the act was committed.
§ 2 [Jurisdiction ratione temporis; lex mitior]
(1) The penalty and any ancillary measures shall be determined by the law which is in force at the time of the act.
(2) If the penalty is amended during the commission of the act, the law in force at the time the act is completed shall be applied.
(3) If the law in force at the time of the completion of the act is amended before judgment, the most lenient law shall be applied.
(4) A law intended to be in force only for a determinate time shall be continued to be applied to acts committed while it was in force even after it ceases to be in force, unless otherwise provided by law.
(5) Subsections (1) to (4) shall apply mutatis mutandis to confiscation, deprivation and destruction.
(6) Unless otherwise provided by law, measures of rehabilitation and incapacitation shall be determined according to the law in force at the time of the decision.
(Note that the last section has been voided in part by the Federal Constitutional Court but this is not relevant here.)
which is a legal principle given by the German constitution, in particular by Article 103 para. 2:
An act may be punished only if it was defined by a law as a criminal offence before the act was committed.
To answer your specific questions with the above rules in mind:
The law you are sued for is deleted while your process is going
In that case you would not be punished.
The law you are sued for is deleted before a case is raised against you (what you did was illegal while you did it)
Same answer, you would not be punished.
The law you are sued for is deleted after your process is finished (could you question the judgement?)
You are out of luck. Only if there would be a new decision for an unrelated reason, your punishment would be taken back.
There is a new law while your process is going
The new law has no relevance at all.
There is a new law after your process is finished (could you question the judgement?)
Again, no relevance to your case.
In another areas of the law the answers to your questions could actually be different but there would be too many cases to consider for a comprehensive answer.