Can I earn Steam achievements while offline?
Since recently, you do get achievements in Offline mode, if you have opened the game in Online mode before, or viewed its details.
See: http://forums.steampowered.com/forums/showthread.php?p=29035241
I thought it was. Now that I've tried it, it seems that Steam doesn't expose the APIs needed to unlock achievements to games when it's in offline mode. So no, you can't unlock achievements in offline mode.
Well - it's some years later and.. it still seems to depend on the game the most. I play recently almost exclusively offline and connect gaming machine to Internet once every few weeks. E.g. in 'Botanicula' - with almost all achievements gathered on the way - I have only the second 1/2 of them on Steam (some of the missing ones being impossible to miss). :) 'Bejeweled 3' seems to sync all achievements perfectly (with their progress also!) on next online session. For 'Plants vs. Zombies' I have only 1 ('Home Lawn Security') on Steam while I have around 3/5 of them in game itself.
There are many threads around the web regarding those games AND achievements, but the common conclusion is: Some games just don't sync them properly and that's it. :(