Lockpicking is determined by your rogues deft hands talent and cunning. To determine how much of each you need you need to determine your lockpick score.
The lockpicking score is simple to compute: L = (cunning - 10) + 10 * [lockpicking rank]
Your lockpicking rank is the number of points you have in the Deft Hands tree. If you have Deft Hands alone, your rank is 1; if you have Device Mastery, your rank is 4. As you can see, each point in the Deft Hands/lockpicking tree is worth 10 points of cunning. Notice that you can actually open locks without any points in the lockpicking tree if your cunning is high enough (I confirmed this in-game).
Great! But how high does your lockpicking score have to be to pick every pickable lock in the game? Unfortunately I don't have the time or know-how to inspect every lock in the toolset to find a maximum value for D. However, there is a big hint in traps.xls, which contains a sheet called lock_difficulty with the following table:
1 Auto Success 10 Simple 20 Very Easy 30 Easy 40 Medium 50 Hard 60 Very Hard 10000 Impossible
So I would tentatively suggest that you need a lockpicking score of 60 to pick every lock that can be picked. You can achieve a lockpicking score of 60 by getting Device Mastery + 30 cunning, or Mech. Expertise + 40 cunning, etc. Of course, some locks will still require keys or event triggers to open. --- So my grammar is bad don't blame me, blame the teachers who taught it to me!