It rained during the night, so the road was very bad.

Literal

Night-middle [at-に] rain [subj-が] fell-[because-ので] road [subj-が] terribly was-bad.

~ので is a reason conjunction — softer and more explanatory than から, which is more direct. のでは indicates an objective/observed reason rather than a subjective justification. たいへん ('very, greatly') is adverbial, intensifying the following adjective.