The present paper investigates the optimal control of the photosynthetic growth process in an artificial light photobioreactor operated in batch mode, the objective being to find an optimal incident light intensity for which the consumption of light energy, for any amount of newly formed biomass, is minimal. By using a simple and reliable model for the photosynthetic growth of microalgae of microalgae, predictions can be made on the quantity of produced biomass and on the amount of light consumed, whose ratio gives the biomass yield on light energy. This variable is unimodal on the allowed range of incident light intensities and has been used as objective function. An improved objective function is proposed by using the specific growth rate and a weighing factor that allows obtaining the desired amount of biomass while the light energy consumption is optimal. A closed-loop control structure has been designed based on the developed optimization algorithm. The optimal controller has been validated in simulation, comparing different lengths of the optimization horizon and the sampling period. It was found that a bigger sampling period, for the cases where there is no online information on the biomass concentration, does not significantly affect the productivity. The optimization algorithm can be used either online or offline, being useful for various experimental setups.