Traps are an integral part of the game and are the domain of rogues. Traps are used by enemies to do anything from throw fireballs at your party to temporarily disabling various party members. Having a rogue in the party with high trap detection and disarm can prevent disastrous combat results.
Note: Every trap disarmed in the game gives your rogue some XP. It is recommended you disarm every trap that you come across even if the trap won't affect the outcome of a battle.
 How Trap Detection Works
From the Trap Detection discussion:
Dragon Age will occasionally check your Trap Disarm score to the Detection Score of each enemy trap. If your Disarm score is equal to or higher than the Detection score, the trap is detected. The formula for Trap Disarm score is below,
 How Trap Disarm Works
Disarm score is calculated as follows:
L = (cunning - 10) + 10 * [lockpicking rank]
L = Lockpicking Score [lockpicking rank] = The points in the Deft Hands tree. Mechanical Expertise would be Rank 3, while Deft Hands would be Rank 1.
The formula above is used for calculating whether a Rogue can unlock locked doors and chests, but it also calculates whether you can detect a Trap.
 Oddball Trap Detection in Jarvia's Room
A discussion in our forums points out the strange behaviour of what appear to be low level traps in Jarvia's room in Carta dungeon of Orzammar. It appears that no matter how high your cunning and Mechanical Expertise (Level 4) those traps are hard to detect, and yet disarming them is easy and only yield 5xp each.