で
can be used to represent causal relationships in a similar way to some english uses of because
, although I am hesitant to say that で
=because
. Your two uses of に
do not really work; I would stay away from trying to use に
as "because" in most cases.
Let's talk about で
though. You've actually picked two very good examples, because although the で
in each of them is representing a causal relationship, they do so in different ways.
ロビーが満員で入室できませんでした
This で
is an abbreviated であり
. You can read more about this here, but this is very close to an English and
, and it can be used to represent causal relationships in a similar way.
ロビーが満員であり、入室できませんでした
The lobby was full (of people) and I could not get in.
No because
necessary. Also note that ロビー
is lobby
, not room
.
As for
悩み事で眠れない
This is the で
particle we know and love. 悩み事
is the thing directly facilitating somebody not sleeping, in the way that the plane in 飛行機で行く
directly facilitates your traveling.
I think it's safe to translate this as "I could not sleep because of my worries", but I encourage you to think of this more as a natural extension of the way で
is used than as it corresponding directly to because
.
Edit: It might be best to think of because of
, rather than just because
, as the possible translation for で
here. It really only plays this role with nouns, which in English will end up as because of [noun]
.