Ideally, a compost pile should get at least four to six hours of sun per day. Depending on where you live, this number will fluctuate, but generally, compost needs at least a few hours of full sun exposure.