Two-dimensional collective Hamiltonian for chiral and wobbling modes. II. Electromagnetic transitions