We investigate the connection between the dynamics of synchronization and the modularity on complex networks. Simulating the Kuramotos model in complex networks we determine patterns of meta-stability and calculate the modularity of the partition these patterns provide. The results indicate that the more stable the patterns are, the larger tends to be the modularity of the partition defined by them. This correlation works pretty well in homogeneous networks (all nodes have similar connectivity) but fails when networks contain hubs, mainly because the modularity is never improved where isolated nodes appear, whereas in the synchronization process the characteristic of hubs is to have a large stability when forming its own community.