Why in thermodynamics, some reactions are taken at constant temperature and pressure? What is its significance?
If you read my answer to this question: Why does the Gibbs free energy only correspond to non-expansion work?, you will see that

$$\mathrm{d}G = V\,\mathrm{d}p - S\,\mathrm{d}T + đW_\text{add}$$

Of these three terms, only $đW_\text{add}$ is related to the electrochemical work. Therefore, in order to equate $\mathrm{d}G$ to $đW_\text{add}$, you have to assume constant $p$ and $T$ such that both $\mathrm{d}p$ and $\mathrm{d}T$ are equal to 0.

In general, this applies to chemical equilibria as well. Because of the above expression, we can say that $G$ is the "natural quantity" to use in systems with fixed pressure and temperature. If instead you had a system with fixed volume and temperature, the Helmholtz free energy would become much more relevant.