This study proposes a controller design method based on block sparse optimization for dynamical network systems. The objective of the controller is to stabilize dynamical network systems with a given convergence rate. The block sparse optimization minimizes the number of controlled nodes. This study is unique in that the structure of the controller is constrained by the network topology of the system. Additionally, the proposed design problem is separable in terms of the distributed optimization over networks. The proposed method is applicable to controller design for the pinning control of consensus systems and the optimal vaccine allocation for epidemic spreading processes.