Only player 1 in local co-op and the host with online co-op can get achievements.
Actually, during my co-op playthroughs,
both players unlocked achievements. This was true for action-specific achievements like killing bosses and completing quests, as well as the general difficulty completion achievements.
I had heard previously that only the host unlocked achievements, but I thought that was bogus since both of us had been getting them... I guess I was the exception?