We have the well-known classification of rings satisfying $a^2=a$ (for each element $a$) in terms of Stone spaces, via $X \mapsto C(X,\mathbb{F}_2)$. Similarly, rings satisfying $a^3=a$ are classified by pairs of Stone spaces via $(X,Y) \mapsto C(X,\mathbb{F}_2) \times C(Y,\mathbb{F}_3)$. (This kind of classification works for all rings with $a^n=a$ where $n$ is such that every prime power $q$ with $q-1|n-1$ is a prime number. Do these $n$ have a name?)

How to classify the rings satisfying $a^4=a$ for each element $a$?

They are commutative and embed into some product of copies of $\mathbb{F}_2$ or $\mathbb{F}_4$. A typical example would be $\{f \in C(X,\mathbb{F}_4) : f(E) \subseteq \mathbb{F}_2\}$ for some Stone space $X$ and a closed subset $E$. But because of $\mathrm{Aut}(\mathbb{F}_4)=\mathbb{Z}/2$ there cannot be a purely topological classification. I suspect that $H^1(X \setminus E,\mathbb{Z}/2)$ might enter here. Is anything known about this?