Nope, the park is open 24/7, including the trees. The tram tour is only offered from about 9:30 AM to dusk, however.
We just returned from Yosemite and I hope to have a trip report up soon. Had a phenomenal trip. Yosemite is gorgeous, especially in May with the waterfalls flowing.
PP is right, you won't see much at night.