We characterize which permutational wreath products W^(X)\rtimes G are finitely presented. This occurs if and only if G and W are finitely presented, G acts on X with finitely generated stabilizers, and with finitely many orbits on the cartesian square X^2. On the one hand, this extends a result of G. Baumslag about standard wreath products; on the other hand, this provides nontrivial examples of finitely presented groups. For instance, we obtain two quasi-isometric finitely presented groups, one of which is torsion-free and the other has an infinite torsion subgroup. Motivated by the characterization above, we discuss the following question: which finitely generated groups can have a finitely generated subgroup with finitely many double cosets? The discussion involves properties related to the structure of maximal subgroups, and to the profinite topology.