What I’ve been taught:
First, there are still consequences to sin. You commit adultery, so your wife doesn’t trust you, or you spend money on cocaine, so your children starve. Your interest in the things of God declines; your spiritual sight decreases and you become spiritually blind.
Secondly, there is God’s discipline, which is something Not To Be Taken Lightly. If you are saved, then God sees to it that you will persevere and will drag you through whatever He has to in order to make sure you make it. Hebrews 12 comes into play. God treats you like sons, meaning He expects a holy life, and you can expect the rod of correction to come upon you in ways that will be extremely painful, but it is meant for your good.
Thirdly, you question whether you were saved. Is God actually at work in your life? Do you take Him seriously? Maybe it’s time to thoroughly and conscientiously examine yourself, because something is there that is not pleasing God, and it is time to make some changes and adjustments so that the sin does not happen again.
Fourth, you realize you’ve wounded Jesus, the one you love more than life. You’ve insulted your savior, held Him up to public ridicule because you haven’t witnessed for Him with your life but rather have become lukewarm, worthless salt, an unfruitful tree.
Fifth, there may be consequences in terms of your ability to minister in the church. If you have certain problems, it may not be best for you to be in a position of trust, such as teaching Sunday School or singing a solo or collecting the offering.
Sixth, your friends, when they find out about it, may decide to help deliver you and play Holy Spirit. You may have conversations in which items 1-4 figure prominently as people decide to restore in love a lost brother.
This all depends on the severity of the sin, of course. But some regard all sin as equally bad, in line with James’ ‘if you break one part of the law, you’ve broken all of it.’