With a partitioned database with N nodes. Assume W is the number of nodes in which the number of nodes required to be locked to be written and R is the number of nodes required to be locked in order to read them.
In which cases, it is recommended to apply a strategy W=1 & R=N? And in which cases should I use W=N & R=1? Also in which cases I should not use W=1 & R=1.
As far as I know - W=N & R=1 is consistent writing.
First, it is important to understand that W and R speak about replicas (aka copies) — not nodes. For example, your cluster may have 5 nodes with N=3. It means only three nodes will have copies of a particular key.
Second, there is no locking in Riak. By changing R/W you control what is considered success by a client. Let's say you're writing to a key with W=3 when N=3, and fail. This doesn't mean that nothing has been written, and all subsequent reads will see the old value. It is still possible that one or two replicas have been updated. It's up to the client to decide how to handle such a failure, but usually it's a retry. In any case, if at least one copy was successful the new value will be eventually propagated to all the replicas (if not replaced by a newer one).
If in the above example you read with R=1 or R=2, you may see either the new value, or the old one depending on how many copies have been updated so far, and which replicas you hit first (obviously, R=2 gives better chances that the new value will be seen and read-repair will kick in). With R=3 everyone is guaranteed to see the same value — either the old (0 successful writes) or the new one (at least one successful write). The read may also fail if at least one replica is unavailable, but at least the client can be sure it doesn't see a stale value.
The trade-off is latency. With W/R=1 the client doesn't have to wait for the result of more than one write/read. You pay with the consistency and reliability though.
So, use W=1 if you want fast writes, but don't mind losing a write (Riak reports success, but the node fails right after that). Use R=1 if you want fast reads and don't mind getting a stale value or "not found".
I would also add that it's important to understand slopy vs strict quorum in Riak.