Ok, so there are a few reasons you could feel guilty:
(1) You actually are in sin. The Holy Spirit convicts Christians when they break his commands (John 16:8). Sometimes this is when we sin by commission (ie: I do what I'm not supposed to do- I lie, I steal, I cheat, I hate, etc.). But this can also be when we sin by omission (ie: I DON'T do the things I'm supposed to do- I don't talk to that person who looks lonely, I don't go out of my way to love others, I don't stand up for what is right, etc.). When we sin, the Holy Spirit often gives us that guilty feeling to lead us to repentance. I know that in the past I have confessed something to Jesus but still felt guilty afterwards because i needed to actually DO something. For example, in grade 7 i cheated on this test and felt sooooo bad. I kept confessing to God but still felt bad- I knew i needed to tell the teacher. After I told her, too, I felt way better.
(2) When Satan accuses you for something that is not sin. Satan is a liar and an accuser (in Greek "devil" means false accuser). Sometimes, to discourage us, he makes us feel a false sense of guilt. We MUST evaluate whether or not we've actually sinned- because if not, we need to simply fix our eyes on Jesus and not give in to Satan's attempt to discourage us.
(3) When Satan accuses you of sin that you've already repented of and been forgiven for. For example, the other day I gossiped about someone to my coworkers. I felt guilty about it, repented to the Lord, but also went and apologized to them. Now that I've confessed it to the Lord and actually changed my behaviour, if I still feel guilty I can be confident that it is just Satan accusing me. If I haven't totally dealt with it, God may be telling me to do so- but if I have, then I need to just take my thoughts captive (2 Cor 10:5) and remember that I am already forgiven (1 John 1:9)