If you want the torch to be above the block, then set its coordinates 1 block above it.... if you want it to the left of the block then set the torches coordinates to be 1 block to the left, etc.
aka:
BlockPos newpos = pos.offset(facing);
You may also want to call the player.canPlayerEdit to see if the player has the editing rights to actually edit the block you want to place the torch in.