I read somewhere that smart contract languages need to be deterministic. Why?
As reminded in the first comment from Richard, smart contracts have to be deterministic because each nodes of the network have to be able to find the same result given the same input for a contract method. Otherwise each node that executes the contract method to validate the transaction would end with different results and no consensus would be possible.
But why the smart contract language itself such as Solidity have to be deterministic? It doesn't have to be.
The power of Solidity and other deterministic languages is that developers don't even have to care about determinism because there is no non deterministic functions in the language.
The determinism prevent any fork in the network. The same goes for Solidity which uses the EVM.
To complete @NicolasMassart 's answer and @user1870400 comment that proposes to generate random values based on a possible Solidity implementation of the Go code used for random number generation, based on https://golang.org/src/math/rand/rng.go you can notice that this code doesn't rely on any random at all but uses hard coded entropy.
If you try it twice without specifying entropy, you'll get the same predictable result. To use this in a concrete use-case, you're supposed to bring your own source of entropy, i.e.: rand.NewSource(time.Now().UnixNano()) for example.
Hopefully inside the EVM, each source of entropy generate the same value for a single transaction across each node of the network, whether you use the timestamp (aka block.timestamp or now -- because it's the timestamp of the time the block was issue by the single miner of this block) or any other pseudo random value.
So even implementing this algorithm in a smart contract using Solidity will lead to a deterministic result.