Which of the following sentences is punctuated correctly?

The student did not complete the homework last night because One Direction was in
town.

The student did not complete the homework last night, because One Direction was in
town.