Proverbs 24:12 (KJV), where God is telling you that you know your own heart, gives reason for Him to hold you accountable for any and all your works:
If thou sayest, Behold, we knew it not; doth not he that pondereth the heart consider it? and he that keepeth thy soul, doth not he know it? and shall not he render to every man according to his works?
Your works show that you follow either the call of God or the call of Satan and when judged on Judgment Day, God renders back to you according to your works.
Ephesians 2:10 (KJV) shows being created in God's workmanship or image as a reason for Him to be expecting you to follow Him:
For we are his workmanship, created in Christ Jesus unto good works, which God hath before ordained that we should walk in them.
When seeking something, God is always fair, Psalm 33:15 (KJV) shows Him giving hearts alike to you and all His children, hearts that equally allow each of you to follow His lead or Satan's:
He fashioneth their hearts alike; he considereth all their works.
God's fairness of giving Heart's alike is fairness to you and the reason that He considereth all your works.
Fairness also includes God eliminating all sin and wrong doings that have previously been forgiven; sin forgiven is sin forgotten. None of them are included when He judges your works on Judgment Day.
Understanding that your works make you accountable requires that you understand how they relate to your faith and in James 2:14 (KJV) you begin learning about works and the effect it has on your faith:
What doth it profit, my brethren, though a man say he hath faith, and have not works? can faith save him?
Your works, according to James, have quite a bit to say about your faith; James 2:17 (KJV) continues explaining:
Even so faith, if it hath not works, is dead, being alone.
Faith is in you and yours is not dead. In addition to making you accountable, your works represent the fact that you have faith in God; James 2:18 (KJV) continues to show this:
Yea, a man may say, Thou hast faith, and I have works: shew me thy faith without thy works, and I will shew thee my faith by my works.
Faith without works is impossible as your works show that you have it; James 2:20 (KJV) summarizes works