Answer
The Bible does not specifically speak of "habits" as such. However, much is said about the meaning of the word: "a thing done often, and hence, usually done easily; an act that is acquired and has become automatic." We all have habits, whether good or bad. Even newborns may come into this world with the habit of already sucking their thumbs. However, for the Christian, the whole of their lives is one of being transformed by the renewing of our minds (Romans 12:2). This implies exchanging old (bad) habits for new (good) ones, in order to please the Lord. For instance, "Do all things without grumbling and complaining” (Philippians 2:14) may demand a new habit on our part. We may need to cultivate a whole new pattern of thinking, from negative to positive as "we take captive every thought to make it obedient to Christ." (2 Corinthians 10:5).
God’s command "Do not steal" means that we must cultivate the habit of being honest in all things. This may require a whole new habit for some. It is the "putting off" of our old nature and "putting on" of the new nature we are given when we are born spiritually into God’s family (Colossians 3:9-10). This is not an easy thing to do and is, in fact, impossible in our own strength. But Paul reminds us, "I can do all things through Christ, who strengthens me" (Philippians 4:13).
Regarding habits pertaining to health issues, such as taking drugs, smoking, drinking, sexual immorality, etc., we are told, "Do you not know that your body is a temple of the Holy Spirit, who is in you, whom you have received from God? You are not your own. you were bought at a price. Therefore honor God with your body" (1 Corinthians 6:19-20). "Do not get drunk on wine, which leads to debauchery. Instead, be filled with the Spirit" (Ephesians 5:18).
For those who belong to Jesus Christ, forming new habits by being controlled by the Holy Spirit becomes a way of life. These new habits are described by Jesus as loving Him. Jesus replied, "If anyone loves me, he will obey my teaching. My Father will love him, and we will come to him and make our home with him" (John 14:23). Most importantly, we are told, "And whatever you do, do all to the glory of God."