The desalination technology using membrane distillation driven by solar energy is a feasible solution for reducing the energy cost. A dynamic simulation model for a solar driven membrane distillation desalination system (SMDDS) is developed on the Aspen Custom Modeler® (ACM) platform for the system performance and optimization study. The rigorous model for the spiral-wound air gap membrane distillation (SP-AGMD) module takes into account the heat and mass transfer resistances associated with each composing layer. The effects of adopting different objective functions, solar radiation conditions, thermal storage tank configurations, as well as the flowrates of the membrane distillation module and the thermal storage tank on the optimized performance are reported. Simple thermal storage tank and lower flowrate of the membrane distillation module are advantageous to higher water production rate. A control system using conventional PI (Proportional/Integral) controllers is proposed and the water production rate can reach about 87% of the optimal result for clear sky operation.