It may not seem logical -- but the truth is, both are right! God is both the righteous and holy Judge of all the earth -- and also the kind and merciful Father who loves us with an everlasting love. Once you realize this, your life will never be the same.
How can God be both righteous and loving? One way to understand this is to recall how a good father deals with his children. A good father, for example, will teach his children the difference between right and wrong. He also won't let them play in the street or drink dangerous chemicals. In other words, he'll be strict with them, and punish them if they refuse to obey him.
But why does he do this? He does it because he loves them! He knows what's best for them and wants to keep them from harm. He also wants to teach them how to avoid dangers in the future and have a happy life. In a far greater way, this is how God deals with us. His rules aren't arbitrary; He gave them to us because He loves us and knows what is best for us.
But the greatest proof of His love is Jesus Christ, who gave His life for us. The Bible says, "This is love: not that we loved God, but that he loved us and sent his Son as an atoning sacrifice for our sins" (1 John 4:10). Open your heart to Christ today.