Let's say I have a Dapp which uses some specific smart contracts to setup connections between different entities. Do I need to care if nodes behave maliciously or does the smart contract guarantee me that connections will be setup only in the way I intend?
I assume by entities, you mean addresses? Unless the entire network was attacked by malicious nodes and they manipulated contract creation protocol, your contract would be created according to the way you set it up. If perchance, one or two nodes wanted to act maliciously in this way, that would not affect your contract's setup on the main network as other honest nodes would follow the correct chain (i.e. the malicious nodes would not be able to propagate their blocks to the main chain as the network would not validate them).