How many volts can a 1 Watt 8 ohm speaker take?
It can take 1W of power.  Voltage is not the problem.

Any more than 1W and the coil will overheat and melt.

It is 8Ω.  Look at it from the point of view of DC.  That means we can use simple Ohm's Law to examine it.

You have 1W and 8Ω.  There are two formulae that incorporate those two values:

\$P=I²R\$

and

\$P=\frac{V²}{R}\$

We're interested in voltage, so rearrange the second to give:

\$V=\sqrt{P×R}\$

So 1W through an 8Ω load must be 2.83V.  Rearrange the current one, so it is:

\$I=\sqrt{\frac{P}{R}}\$

and we get a current draw of .354A, or 353.55mA.

The fact that your IO ports are limited to 40mA (That's the absolute maximum by the way - Atmel don't recommend more than 20mA), means:

\$P=VI = 0.2W\$, which is why your speaker doesn't melt and isn't very loud.

So what do you want?

Well, you want 2.83V across your speaker with unlimited current available, or unlimited voltage available with 353.55mA current.  The former is more achievable, so we'll do that.

A simple voltage divider can limit the voltage to 2.83V.  The formula

\$V_{OUT}=\frac{R_2}{R_1+R_2}V_{IN}\$ can be re-arranged to give:

\$R_1=R_2(\frac{V_{IN}}{V_{OUT}}-1)\$

We know R2, that's 8Ω, Vin is 5V and Vout is 2.83V.  So substitute the values and we have:

\$R_1=8(\frac{5}{2.83}-1)\$

which gives us 6.134Ω. The closest E24 would be 6.8Ω, which would be ideal.  Of course, you need a nice chunky resistor, at least 1W, preferably a little more.

Your schematic could look like:







simulate this circuit &ndash; Schematic created using CircuitLab

Or, for the more traditional class A amplifier arrangement:







simulate this circuit

Of course, your 6.8Ω resistor would then have to cope with the full 5V across it, so would need to be a minimum of 3.6W.