Precast concrete comprises the basic components of modular buildings. The efficiency of precast concrete building component production directly impacts the construction time and cost. In the processes of precast component production, mold setting has a significant influence on the production efficiency and cost, as well as reducing the resource consumption. However, the development of mold setting plans is left to the experience of production staff, with outcomes dependent on the quality of human skill and experience available. This can result in sub-optimal production efficiencies and resource wastage. Accordingly, in order to improve the efficiency of precast component production, this paper proposes an optimization model able to maximize the average utilization rate of pallets used during the molding process. The constraints considered were the order demand, the size of the pallet, layout methods, and the positional relationship of components. A heuristic algorithm was used to identify optimization solutions provided by the model. Through empirical analysis, and as exemplified in the case study, this research is significant in offering a prefabrication production planning model which improves pallet utilization rates, shortens component production time, reduces production costs, and improves the resource utilization. The results clearly demonstrate that the proposed method can facilitate the precast production plan providing strong practical implications for production planners.