I also have this problem on a '99 328i. When I turn the a/c on, it rattles, as you say, or chatters or knocks as I would describe it. First, thing I did was replace the a/c belt tensioner (and the other tensioner and pulley) but that didn't resolve it and the old a/c belt tensioner didn't seem to be worn out.
It makes this sound upon a/c startup and most typically when sitting at idle. Not dedectable while driving.
The a/c works fine and there are no codes being thrown.
Anyone else have this problem or know of a solution or way to investigate further?