Doing Righteousness simply means, believing in Jesus.
3:7 Little children, let no man deceive you: he that doeth righteousness is righteous, even as he is righteous.
When the bible talks about doing righteousness it's talking about doing something that makes you a righteous person. Since the bible tells us that all have sinned and come short of the glory of God,and there is none righteous, no, not one, and there is not a just man upon earth that doeth good and sinneth not, how does one become righteous?
Of course, it's obvious that the only way any sinful person can become righteous is by having all of his sins forgiven and righteousness automatically imputed upon him by faith. And the only way that can happen is by recieving Jesus as your Lord and Saviour. So, doing righteouness simply means believing in Jesus. It doesn't mean obeying a lot of commandments and rules and being on some kind of self-righteous works trip.
3:8 He that committeth sin is of the devil; for the devil sinneth from the beginning. For this purpose the Son of God was manifested, that he might destroy the works of the devil.
3:9 Whosoever is born of God doth not commit sin; for his seed remaineth in him: and he cannot sin, because he is born of God.
When you recieve Jesus He destroys the works of the devil in you. He wipes away all your sins, past, present and future so that you can't sin anymore. You'll still make mistakes and wrong decisions and do bad things but nothing you can do is wrong from that time forward. It is wrong to get under condemnation for anything you think are wrong or that other people tell you are wrong. you are white as snow, clean as a whistle, made perfect by the blood of the the Lamb.
8:1 There is therefore now no condemnation to them which are in Christ Jesus, who walk not after the flesh, but after the Spirit.