In this paper, we discuss the optimization problem of the synchronization for Kuramoto oscillators in coupled star networks. In previous studies of star networks, the natural frequencies of leaf nodes are usually equal or only adjusted within a small parameter range, but this assumption is not satisfied in most of cases. Considering the random distribution of the frequency of the leaf nodes in a single star network and multiple coupled star networks, the critical coupling strength required for system synchronization is obtained according to the boundedness of the sinusoidal function. In a single star network, the piecewise linear relationship between the critical coupling strength of the system and the frequency of the central oscillator is found. In the coupled system of two star networks, we consider that they are coupled through the central node. The parameter plane of the natural frequency of the central node will be divided into different regions. In each region, the critical coupling strength is determined by the coupling strength within the respective star networks or the coupling strength between the two central nodes. Considering the coupling of multiple star networks, we introduce a central connection node through which the central nodes of multiple star networks are coupled. In the above two models of multiple coupled star networks, the piecewise linear relationship between the critical coupling strength of the system and the sum of frequencies of the center oscillators is found. The critical coupling strength of the two types of networks is smallest at the piecewise point. According to the optimization results, we find that with the increase of coupling strength, when there is only one cluster in the system, the critical coupling strength becomes small. So we can reduce the critical coupling strength of the system by adjusting the frequency of the central oscillator for achieving the effect of synchronous optimization. When multiple clusters are generated in the system, the critical coupling strength turns large. Because of the similarity between star network and scale-free network and the application of Kuramoto model in power grid, this paper can provide a good theoretical reference for the further study on synchronization optimization of scale-free network and power grid.