It's dangerous to swim at night.

Literal

Night [at-に] swim-[nom-のは] dangerous [copula-です].

Standard [verb]+のは+adjective pattern for 'it is [adjective] to [verb].' 泳ぐ ('swim') is the base verb. 危険 is the na-adjective 'dangerous.'