We present comparatively simple two-dimensional and three-dimensional checkerboardlike optical lattices possessing nontrivial topological properties accompanied by topological surface states. By simple tuning of the parameters, these lattices can have a topological insulating phase, a topological semimetallic phase, or a trivial insulating phase. This allows the study of different topological phase transitions within a single cold-atom system. In the topologically nontrivial phases, flat bands appear at the surfaces of the system. These surface states possess short localization lengths such that they are observable even in systems with small lattice dimensions.