The bill is typically presented when the work is complete, and is due when presented.

Naturally, the specific job circumstances matter. Companies that do residential service certainly present the bill promptly, and may even want the credit card before work starts.

In commercial work, it is more common to present a bill on completion, but payment usually takes a few days .... the paperwork needs time to churn.
When are things complete? While there is some differences between contractors, this decision usually isn't made until everyone is happy that everything is working properly. For example, lights installed today will not be considered 'complete' until I come by tonight, to make sure they are working properly.

Naturally, there are some who take advantage of billing arrangements, and deliberately sit on the invoice for 30, 60, even 90 days. That's why this topic has come up so often in these forums.

During construction, the customer may be presented with bills during the course of the job. For example, to cover materials ordered and work already done. Again, the contractor often simply can't afford to be 'strung along' for months after the job is completed, and is breaking his risk into smaller pieces.