悪い・悪かった can be used as a way of saying "sorry" in an informal context, kind of like "my bad."
美人じゃなくて悪かったですね! - Sorry I'm not a beauty.
あんまり広い部屋じゃなくて悪いな - Sorry that the room isn't very large.
よかった is used as "I'm glad" sometimes.
無事でよかった - I'm glad you're safe.