###Preamble### Firstly, there is a difference in the Greek of Matthew 6:1 that is provided by the TR - Textus Receptus, and that provided by Nestle-Aland. The KJV comes from TR and has ἐλεημοσύνην (alms), whereas the HCSB, for example, comes from Nestle-Aland, and has τὴν δικαιοσύνην (righteousness).
1 Be careful not to practice your righteousness[a] in front of people, to be seen by them. Otherwise, you will have no reward from your Father in heaven. 2 So whenever you give to the poor, don’t sound a trumpet before you, as the hypocrites do in the synagogues and on the streets, to be applauded by people. I assure you: They’ve got their reward! 3 But when you give to the poor, don’t let your left hand know what your right hand is doing, <sup4 so that your giving may be in secret. And your Father who sees in secret will reward you.[b]
-- Matthew 6:1-4 (HCSB)
My answer arose from the Nestle-Aland text, but it is still applicable, regardless of the Greek text chosen.
###Comments### τὴν δικαιοσύνην is what Jesus uses in the sermon on the mount when he says:
Blessed are they which do hunger and thirst after righteousness τὴν δικαιοσύνην: for they shall be filled.
-- Matthew 5:6 (KJV)
τὴν δικαιοσύνην is what Jesus uses later in Matthew 6 to explain the sort of righteousness one should be hungering and thirsting for:
But seek ye first the kingdom of God, and his righteousness τὴν δικαιοσύνην; and all these things shall be added unto you.
-- Matthew 6:33
In Matthew 6:1 Jesus says not to do τὴν δικαιοσύνην ὑμῶν (your righteousness), and then goes on to say in Matthew 6:33 that we should seek τὴν δικαιοσύνην αὐτοῦ (his righteousness). This can only mean that "our righteousness" is not the same as "his righteousness". How can they not be the same?
Well, the Father's righteousness glorifies Him, and our righteousness glorifies us. So, every time we are glorified, then it's "our righteousness" that achieves it, and every time the Father is glorified, it's "his righteousness" that achieves it. There clearly must be something about what moves us, such that our glory becomes His glory.
Now, if we were to do ἐλεημοσύνην (alms, i.e. charitable deeds - Matthew 6:2) in such a way as to glorify ourselves, then such behaviour is motivated by "our righteousness, not "his righteousness".
In regard to Matthew 5:14, Jesus uses ὑμῶν τὰ καλὰ ἔργα (your good works) to explain what he means by "let your light so shine". ἔργα is a generic term for any activity that occupies one's time. So, what are "good works"?
Good works are those activities that move the community towards a state of goodness, i.e one typified by heavenly governance, peace, blessing, comfort, healing, and prosperity; and away from a state of evil, i.e. one typified by human governance, discord, distress, misery, injury, and loss.
Good works speak for themselves, and will, in-and-of-themselves, bring esteem to the one who does them. However, Jesus tells us that the PURPOSE of good works is that men should "glorify your Father which is in heaven". To do this, the Father's pleasure must be preeminent in the pursuits of one's heart. However, only the person him/herself and God, are privy to such knowledge.