As a rule of thumb, during the hours the tower is not in operation, the Class D surface area becomes Class E surface area or a combination of Class E to 700′ above ground level and Class G to the surface, but this varies with each airport so you’ll need to consult the chart supplement.
Class D surface areas may be designated as full-time (24 hour tower operations) or part-time.
Part-time Class D effective times are published in the Chart Supplement
Where a Class D surface area is part-time, the airspace may revert to either a Class E surface area or Class G airspace. When a part–time Class D surface area changes to Class G, the surface area becomes Class G airspace up to, but not including, the overlying controlled airspace
The airport listing in the Chart Supplement U.S. will state the part–time surface area status (for example, “other times CLASS E” or “other times CLASS G”)