One of the most important goals for modern cosmology is to reveal the nature of dark matter. Current and future generations of gamma-ray telescopes aim to achieve it by looking for gamma rays from dark matter annihilation. As one of the promising targets for the annihilation gamma rays, we first consider clusters of galaxies, which confine the largest amount of dark matter in a virialized volume. I show some results of the analysis of gamma-ray data from ~3-yr Fermi telescope, in terms of upper limits on annihilation cross section. Especially if the clusters host lots of substructure, the cross-section upper limits almost exclude canonical value required to produce dark matter as a thermal relic of early Universe. More conservative limits obtained based on the assumption that dark-matter density profile is completely smooth, on the other hand, are still about two orders of magnitude larger than the canonical value. I also show the result of stacking analysis of the galaxy clusters, which makes it possible to probe further smaller regime of annihilation cross section by a factor of a few. Then I discuss the diffuse gamma-ray background, and implications of the above mentioned limits on cross section for its mean flux and also anisotropy structure.