Code:
local name, rank, icon, count, type = UnitDebuff("target","Deadly Poison")
That usage of UnitDebuff is new in 2.0 (previously you needed to pass the debuff slot ID, an integer 1-16, for the second argument, and iterate over them all).
That should get whether the target is poisoned or not (all returns would be nil if the debuff is not active). Note there is a ~0.5sec delay between a spell being cast and its debuff appearing, nominally the server round-trip time.
You need to know the name of the debuff, not the name of the spell/ability that caused it, to get the status. Fortunately for all the rogue poisons they're the same (I think)
If you want to collect data when your weapon poisons something, you'll need to hook an event. As far as I can tell there isn't a specific one, you could hook the combat events, which is a bit of a more advanced topic.
The relevant events you're looking for are:
CHAT_MSG_SPELL_PERIODIC_CREATURE_DAMAGE (debuff type poisons like deadly, wound, crippling, mind-numbing)
CHAT_MSG_SPELL_SELF_DAMAGE (instant poison)
You'd have to parse the message and filter for each poison name.