Yes.
Did you also read the datasheet for the BS170? Datasheets are documents you have to learn how to read. In case of the BS170 \$V_{GS}\$ (page 2) is important. It's the minimum gate voltage at which the MOSFET starts conducting. For the BS170 this \$V_{GS}\$ can be anything between 0.8V and 3V. This wide range is typical of MOSFETs. It means that in a worst-case scenario you only get 1mA of drain current when driven from a 3V microcontroller, which isn't enough to drive a LED! If you're using the ATmega16 (and not the ATmega16L) you won't have this problem.
Most important graph for the BS170 is figure 1 on page 3.

This shows that at \$V_{GS}\$ = 5V you can have 800mA of drain current.
MOSFET's gates are extremely ESD sensitive; you can zap them just by looking at them, so to speak. Make sure you're properly grounded when handling them (antistatic wrist strap), this also goes for your soldering iron.
I also make it a habit to have a resistor from the gate to the source, this ensures that the BS170 remains off when for one reason or another the gate should be floating. This can be a 1M resistor.