I remember it was from the US, not older than 1980. The main character died and went to a place, looking like a regular city, where people wait to have their lives analysed by some officials. I think there was some sort of trial/process where the recently passed away could defend his actions while alive. In the end, depending on the decision, they got to ride a bus to Heaven or to some other place.
There was also a romantic angle, the protagonist met a woman, they fell in love and in the end he had to chase her bus (because he was not initially allowed to 'go on'), but the officials finally allowed the bus driver to open the door and the film ended.