Question: In the derivation of the Boltzmann distribution they consider a system $A$, enclosed by a diathermal wall in a heat reservoir $R$. Then they calculate the probability that the system $A$ is in an energy state $E\_r$, given that the reservoir has a temperature $T$ and energy $E\_0$ and the two systems are in thermal equilibrium. 

I don't understand though why we can speak about probabilities. I would rather expect that we can calculate the energy of $A$ exactly if indeed the systems are in thermal equilibrium. Because the temperature of $R$ is then exactly $T$, so we can calculate its energy exactly (this last step is what I think we can do, though I'm not completely sure). So I wonder: is the derivation indeed for thermal equilibrium, like they state explicitly in my book. Or is that just a confusing mistake, and does the Boltzmann distribution give the probability if the system $A$ is in contact with $R$ but not necessarily in equilibrium with it? In the last case the derivation seems actually to make sense, but I'm worrying about the fact that they explicitly say the it is for thermal equilibrium. The fluctuations in energy cause then also fluctuations in temperature, so according to this, there would also never be exactly thermal equilibrium (so I'm not exactly sure the last case should be the right one either).

Answer: 
Thermal equilibrium between the system $A$ and the reservoir $R$ doesn't mean that the energy of $A$ is fixed. Thermal equilibrium occurs when the *ensemble average of the energy* of $A$ is fixed. In particular, during thermal equilibrium, the energy of $A$ with generically fluctuate about its ensemble average value. 

Moreover, knowing the temperature of a system does not allow you to compute its precise energy, but rather it's ensemble average energy.

You might be wondering then why it is often said that the energy of an ideal monatomic gas is given by
$$
 E = \frac{3}{2}NkT
$$
It seems as though we can compute the precise energy of given gas sample given its temperature. The error in this reasoning is that in this expression $E$ is precisely the ensemble average energy of the gas sample, not its precise energy at any given moment. Explicitly, we could have more precisely written this equation as
$$
 \langle H \rangle = \frac{3}{2} NkT
$$
where $H$ is the system's Hamiltonian, and angled brackets denote ensemble averages.
We are given that system A is "in equilibrium" with a heat reservoir R at temperature T and that the total energy of the combined system A and R is fixed.

This does not specify the exact micro-state of either system A or system R. It is not enough information, there are a gazillion different possibilities.

What exactly we mean in physics when we say "probability" is a partly philosophical question which, though it interests me and is my specialty, I am not going to go into here since your question can be answered without it. The normal operationalization of "probability" in thermodynamics or Stat Mech is the proportion of micro-states that would be macroscopically indistinguishable in the posed problem. (In classical physics.) So the probability that, subject to the given information (and the givens can be easily tested with macroscopic observations to see whether they hold or not, use a thermometer), 
system A has energy E is the number of different micro-states of the combined system A + R
in which A exactly has energy E and is in equilibrium with R and R has temperature T, and the energy of R is exactly $E\_o - E$, ------ divided by the number of different micro-states of the combined system A + R in which A is in contact with R, in equilibrium, R has temperature T, and the total energy is exactly the given $E\_o$. 

The art is to find various shortcuts for calculating this, at least approximately.

You can ask what "equilibrium" and "contact" and "temperature" mean, but you didn't....not yet....

This answer is largely in agreement with the other answer but I think is blunter, and clearer, and leaves out quantum considerations which just confuse the issue.

But note carefully: the system A cannot really be said to have a temperature. It is only a statistical ensemble of systems which has a temperature. The real actual live individual system A has, as you noticed, a precise energy although we don't know what it is and other energies were possible under the conditions of the problem. We have to study all possibilities consistent with the givens, not only the actual one that obtains. The system A could be a single molecule, for example. We do not attribute a temperature to a single molecule.