Let $G$ be a finite group and $K \subset G$ a subgroup. Then $(G,K)$ is a [Gelfand pair](https://en.wikipedia.org/wiki/Gelfand_pair) if the double coset Hecke algebra $\mathbb{C}(K \backslash G / K)$ is commutative.


Let $H$ be a subgroup of $Aut(G)$. We will consider $H$ and $G$ as subgroups of $G\rtimes H$.


*Lemma*: $(G\rtimes H,H)$ is a Gelfand pair iff $\forall g,g' \in G$, $HgHg'H = Hg'HgH$.


*Proposition*: If $G$ is abelian, then $(G\rtimes H,H)$ is a Gelfand pair.  

*proof*: $\forall h\_1, h\_2, h\_3 \in H$ and $\forall g,g' \in G$, we have:  

$$h\_1gh\_2g'h\_3 = h\_1 g \sigma\_{h\_2}(g') h\_2 h\_3 = h\_1 \sigma\_{h\_2}(g') g h\_2 h\_3 = h\_1 h\_2 g' h\_2^{-1} g h\_2h\_3$$ which means that $HgHg'H \subseteq Hg'HgH$. Idem, $Hg'HgH \subseteq HgHg'H$. $\square$


*Question*: Is the converse true [i.e. $(G\rtimes H,H)$ Gelfand pair $\Rightarrow$ $G$ abelian]? 



Is $(G\rtimes H,H)$ a Gelfand pair iff $G$ is abelian?
No, let $G$ be an arbitrary group and take $H=G$ acting on itself by conjugation. Then $H$ becomes the diagonal in $G\rtimes H\cong G\times G$. This is well known to be a Gelfand pair.


PS: The Hecke algebra of the pair $(G\rtimes H,H)$ is in fact equal to the fixed point algebra $\mathbb C[G]^H$. This explains your observation when $G$ is abelian.


