For example:
寒さに震える and 寒さで震える
恐怖に震える and 恐怖で震える
It seems like they both mean the same thing?
There is not much difference in these particular cases. Both に and で indicate a cause.
Having said that, I personally sense a subtle difference in nuance. The sentence with に in each pair brings me a more vivid image of the subject enduring the cold or the fear, shivering. This may be because the particle に makes me imagine the subject in that situation. It also sounds a bit literary. The sentence with で sounds to me more neutral and matter-of-fact. But this is subjective.