Categorical description of the restricted product (Adeles)
Personally I think that the restricted product description should be avoided. It is best to define $\widehat{\mathbb{Z}}$ to be the inverse limit of the system of all quotients $\mathbb{Z}/n$ (without gratuitously factoring $n$ as a product of primes) and then put $\mathbb{A}=(\mathbb{Q}\otimes\widehat{\mathbb{Z}})\times\mathbb{R}$. We can topologise this by giving $\mathbb{R}$ the usual topology, and $\mathbb{Q}\otimes\widehat{\mathbb{Z}}$ the topology for which the sets $q\otimes\widehat{\mathbb{Z}}$ form a basis of neighbourhoods of zero. Now the adeles for any number field $K$ can be defined as $\mathbb{A}\otimes K$. Any $\mathbb{Q}$-basis for $K$ identifies $\mathbb{A}\otimes K$ with $\mathbb{A}^d$ and thus gives a topology on $\mathbb{A}\otimes K$, which is easily seen to be independent of the choice of basis. The connection with primes/valuations for $K$ should be a theorem, not a definition.
I was puzzled by this question as well a while ago. Here is a suggestion, which worked for me:
The product and the co-product of categories are best defined by an universal mapping property.
The adeles $\mathbb{A}$ are the inductive limit of all $S$-adeles $$\mathbb{A}(S) = \mathbb{R} \times \prod\limits_{p \in S} \mathbb{Q}_p \times \prod\limits_{p \notin S} \mathbb{Z}_p$$ for a finite set of places. The universal property is described as follows: If you are given a map $$\phi : \mathbb{A} \rightarrow X$$ to some topological space $X$, then there exists for every large enough set $S$ a unique $\phi_S : \mathbb{A}(S) \rightarrow X$ such that $\phi_S = \phi$ on $\mathbb{A}(S)$.
Remark: For this to work, it is important that all but finitely many compact subrings ($\mathbb{Z}_p$ in the above context) are actually open subrings, since you have to choose the characteristic functions of this set at the places $p \notin S$ to construct $\phi_S$. So I doubt that the restricted product can be defined in the category of locally compact groups/rings/spaces in such a fashion. On the other hand, the restricted product can be defined for a family of pairs of topological spaces $(A_i \supset B_i)_i$ with almost all $B_i$ are open in $A_i$.
First, the references cited by KConrad above are unduly neglected/obscure... while answering the question as it stands.
Also, as Mrc Plm's answer, quite literally the adeles are a colimit of products.
Third, indeed, one can (successfully) abstract the "restricted-product topology" (again, as KConrad notes, not "restricted product-topology", but the other grouping), BUT what is not clear is what the point of that would be, I think. That is, apart from discussion of adeles, ideles, adelizations of reductive groups over global fields, and their repn theory, there are not many examples of naturally-occurring "restricted products". Thus, although, if we persevere, we can abstract the notion, after having done so we do not have revelations about how these things were all around us but merely un-named. :)
That is, the notion of "restricted product" is reasonably perceivable as a bit of a let-down, since it explains little.
I find it an interesting rhetorical question "Do adeles occur in nature?", as opposed to "can we construct/axiomatize" them, or "are they useful?" A simpler analogue is the p-adic integers $\mathbb Z_p$ which, although eminently constructible as a completion of $\mathbb Z$, one could ask why make that metric, ... considering that it takes some thought to verify that it is a metric at all, and, then, why complete? That is, by now, to say that $\mathbb Z_p$ is the (projective) limit of $\mathbb Z/p^n$ is more persuasive to me of the occurring-in-nature aspect.
Similarly, the "solenoids" made by taking limits of $\mathbb R/N\cdot \mathbb Z$ have a limit which is arguably a natural object. When we already have $\mathbb Q_p$ in hand, we can exhibit an action of $\mathbb Q_p$ on this solenoid. Honest investigation of how close we can come to making the genuine product of p-adics act leads to the restriction appearing in the blunt definition of adeles. In various logical sequences, one finds that the solenoid is $\mathbb A/\mathbb Q$. In this setting, the compactness of the quotient is immediate, since (Tychonoff) limits of Hausdorff compacts are compact.
That is, one can "discover" much of the "restricted product" notion by trying to write the solenoid as a quotient by $\mathbb Q$ of something that has an action of $\mathbb R$ and all the $\mathbb Q_p$'s on it, etc.
That is, it is possible to give some sense of inevitability to these notions perhaps better than merely giving the definitions.