Complaining comes from people who don't really trust God. If you really trust in the Lord you rest in him knowing that he's going to do just what he says. Proverbs 3: 5-6 [Amplified version] says:
5 Lean on, trust in, and be confident in the Lord with all your heart and mind and do not rely on your own insight or understanding.
6 In all your ways know, recognize, and acknowledge Him, and He will direct and make straight and plain your paths.
People have forgotten how to live as a Christian. Everywhere you look in God's word, you'll find scripture where Jesus talks about being grateful. Instead of whining about all that's negative, Jesus preaches about looking for the positive. The selfishness that seems to engulf everyone at times colors your view so badly you can't see all the good things around you. Our insight or understanding of things is very shallow. This is why God says that his ways are not our ways nor his thoughts our thoughts. Unless we learn to trust God, we will find ourselves on the outside looking in.
God impregnates each and everyone of us with a dream and a vision of a bright future. But we often abort those dreams by speaking the opposite of what God says. Many of us don't realize that our blessings or curses don't come from what we say or do in public, they come from what we do under pressure and what we do secretly. Matthew 6:18 [KJV] That thou appear not unto men to fast, but unto thy Father which is in secret: and thy Father, which seeth in secret, shall reward thee openly. If we really understood this we would be busier working more on what is hidden and not what is seen.
What can we do to stop complaining?
-Becoming aware of how much you complain is the first step to stopping. For the next 24 hours, keep track of every complaint that comes out of your mouth. When you look back, you will be absolutely amazed. You also want to keep track of the negative thoughts that continually run through your mind. Your mouth follows whatever is going on in your thoughts, so go directly to the source.
-Start saying positive, life affirming stuff on purpose. The only way to replace all that negative stuff is to deliberately program the right stuff in to replace it. It's going to take some practice, but pretty soon it will become habit for you to find the positive, to avoid the negative, and to eliminate your urge to complain.
-Distance yourself from people who live to complain. It's too easy to fall back into old habits, so it's absolutely necessary to surround yourself with people who don't live for the negative. They might not like it, and they probably won't understand. But your life will start to get better the sooner you eliminate complaining people from your life.
-Lastly, ask God to show you what you can do to help someone else in this area. Sometimes helping someone else helps you more than trying to help yourself. Who knew? As you build a network of friends and family who want to eliminate complaints from their world too, pretty soon you'll be able to look back and see just how much better your life has become.