Network topology and node dynamics play a key role in forming synchronization of complex networks. Unfortunately there is no effective synchronization criterion for pinning synchronization of complex dynamical networks with switching topology. In this paper, pinning synchronization of complex dynamical networks with switching topology is studied. Two basic problems are considered: one is pinning synchronization of switched complex networks under arbitrary switching; the other is pinning synchronization of switched complex networks by design of switching when synchronization cannot achieved by using any individual connection topology alone. For the two problems, common Lyapunov function method and single Lyapunov function method are used respectively, some global synchronization criteria are proposed and the designed switching law is given. Finally, simulation results verify the validity of the results.