Short answer
In Islam, loving God (﷾) means loving Him more than anyone or anything else, and showing it by obeying Him. Every good thing a person has comes from Him, so He deserves the greatest love. The Qur'an says people of faith are overflowing in their love for Allah (﷾). It tells the Prophet (ﷺ) to say: if you love Allah (﷾), follow me, and Allah (﷾) will love you. Jesus taught a similar rule in the Gospel of John: if you love me, keep my commandments. Muslims love the Prophet (ﷺ) because God (﷾) sent him, not in God's (﷾) place. Loving God (﷾) also means loving, for His sake, the people He loves. And when God (﷾) loves a servant, He puts love for that person in the hearts of others.
Full explanation
Love above all else
The Qur'an speaks of people who love others as they should love God (﷾). It says the believers love Allah (﷾) even more. Loving, trusting or fearing anyone more than God (﷾) leads to sin. It makes people disobey God (﷾) to please others. The Qur'an also warns those who hold family, wealth or home dearer than Allah (﷾) and His Messenger (ﷺ). The reason is simple. Every blessing comes from God (﷾), and His favours are too many to count. So He deserves the love we give to anyone who does us good, and far more.
“Yet there are men who take (for worship) others besides Allah, as equal (with Allah): They love them as they should love Allah. But those of Faith are overflowing in their love for Allah. If only the unrighteous could see, behold, they would see the penalty: that to Allah belongs all power, and Allah will strongly enforce the penalty.”
“Say: If it be that your fathers, your sons, your brothers, your mates, or your kindred; the wealth that ye have gained; the commerce in which ye fear a decline: or the dwellings in which ye delight - are dearer to you than Allah, or His Messenger, or the striving in His cause;- then wait until Allah brings about His decision: and Allah guides not the rebellious.”
“And He giveth you of all that ye ask for. But if ye count the favours of Allah, never will ye be able to number them. Verily, man is given up to injustice and ingratitude.”
Love shown by obedience
Love of God (﷾) is not only a feeling. The Qur'an tells the Prophet (ﷺ) to say that whoever loves Allah (﷾) should follow him. Then Allah (﷾) will love that person and forgive their sins. We already know this from human love: we try to do what the one we love asks. The Gospel of John, in the Bible, records Jesus teaching that love is shown by obedience. In the same chapter he says the word they hear "is not mine, but the Father's which sent me".
“Say: "If ye do love Allah, Follow me: Allah will love you and forgive you your sins: For Allah is Oft-Forgiving, Most Merciful."”
“If ye love me, keep my commandments.”
“He that loveth me not keepeth not my sayings: and the word which ye hear is not mine, but the Father’s which sent me.”
The first commandment, as Jesus named it
Jesus was asked which commandment comes first. He named the oneness of God (﷾). Then he named the command to love God (﷾) with all one's heart, soul, mind and strength. The Qur'an asks believers for the same whole-hearted love.
“And Jesus answered him, The first of all the commandments is, Hear, O Israel; The Lord our God is one Lord:”
“And thou shalt love the Lord thy God with all thy heart, and with all thy soul, and with all thy mind, and with all thy strength: this is the first commandment.”
“Yet there are men who take (for worship) others besides Allah, as equal (with Allah): They love them as they should love Allah. But those of Faith are overflowing in their love for Allah. If only the unrighteous could see, behold, they would see the penalty: that to Allah belongs all power, and Allah will strongly enforce the penalty.”
The sweetness of faith
The Prophet (ﷺ) said three things give the sweetness of faith, which is the joy of true belief. First, holding Allah (﷾) and His Messenger (ﷺ) dearer than anything else. Second, loving others only for Allah's (﷾) sake. Third, hating to return to disbelief as one would hate to be thrown into fire. So loving God (﷾) includes loving the people He loves.
Anas reports that the Prophet (ﷺ) said three things bring the sweetness of faith: that Allah and His Messenger are dearer to a person than anything else; that he loves another person only for Allah's sake; and that he hates to return to disbelief as he would hate to be thrown into fire.
God's (﷾) love for His servants
The Qur'an names those God (﷾) loves. They are those who do good, the righteous, the just and the patient. They are also those who put their trust in Him, and those who turn to Him in repentance and keep themselves pure. It also says God (﷾) will place love for the righteous believers in people's hearts. The Prophet (ﷺ) described how it happens. God (﷾) tells Gabriel, the angel who brings His revelation, that He loves a servant. The angels then come to love that servant, and acceptance for the servant is laid down on earth. The Prophet (ﷺ) also said that God (﷾) is more merciful to His servants than a mother to her child. And God (﷾) comes running to the one who walks toward Him.
“And spend of your substance in the cause of Allah, and make not your own hands contribute to (your) destruction; but do good; for Allah loveth those who do good.”
“(But the treaties are) not dissolved with those Pagans with whom ye have entered into alliance and who have not subsequently failed you in aught, nor aided any one against you. So fulfil your engagements with them to the end of their term: for Allah loveth the righteous.”
“(They are fond of) listening to falsehood, of devouring anything forbidden. If they do come to thee, either judge between them, or decline to interfere. If thou decline, they cannot hurt thee in the least. If thou judge, judge in equity between them. For Allah loveth those who judge in equity.”
“How many of the prophets fought (in Allah's way), and with them (fought) Large bands of godly men? but they never lost heart if they met with disaster in Allah's way, nor did they weaken (in will) nor give in. And Allah Loves those who are firm and steadfast.”
“It is part of the Mercy of Allah that thou dost deal gently with them Wert thou severe or harsh-hearted, they would have broken away from about thee: so pass over (Their faults), and ask for (Allah's) forgiveness for them; and consult them in affairs (of moment). Then, when thou hast Taken a decision put thy trust in Allah. For Allah loves those who put their trust (in Him).”
“They ask thee concerning women's courses. Say: They are a hurt and a pollution: So keep away from women in their courses, and do not approach them until they are clean. But when they have purified themselves, ye may approach them in any manner, time, or place ordained for you by Allah. For Allah loves those who turn to Him constantly and He loves those who keep themselves pure and clean.”
“On those who believe and work deeds of righteousness, will (Allah) Most Gracious bestow love.”
Abu Hurayra reports that the Prophet (ﷺ) said: when Allah loves a servant, He calls Gabriel and tells him that He loves that person, so love him; Gabriel loves him and announces it to the people of heaven, who love him too; then acceptance is laid down for him among the people of the earth.
Umar reports that captives were brought to the Prophet (ﷺ), among them a woman whose breasts were full of milk; whenever she found a child among the captives, she held it to her chest and nursed it. The Prophet asked whether she could ever throw her child into a fire. They said no. He said: Allah is more merciful to His servants than this woman is to her child.
Abu Dharr reports that the Prophet (ﷺ) said that Allah says: whoever brings a good deed will have ten like it or more; whoever draws a hand-span closer to Me, I draw an arm's length closer to him; whoever comes to Me walking, I come to him running; and whoever meets Me with sins that would fill the earth, but without associating anything with Me, I will meet him with forgiveness as great.
The father who runs
Jesus' parable of the lost son draws the same picture as the Prophet's (ﷺ) saying above. God (﷾) comes running to the one who walks toward Him. The father sees his son a great way off and runs to him. He forgives his son with no sacrifice for the sin and no one punished in his place. Hebrews, a book of the New Testament, says that "without shedding of blood is no remission" (no forgiveness). The parable forgives without it.
“And he arose, and came to his father. But when he was yet a great way off, his father saw him, and had compassion, and ran, and fell on his neck, and kissed him.”
“And almost all things are by the law purged with blood; and without shedding of blood is no remission.”
Abu Dharr reports that the Prophet (ﷺ) said that Allah says: whoever brings a good deed will have ten like it or more; whoever draws a hand-span closer to Me, I draw an arm's length closer to him; whoever comes to Me walking, I come to him running; and whoever meets Me with sins that would fill the earth, but without associating anything with Me, I will meet him with forgiveness as great.
Perspectives
The Islamic perspective
God (﷾) alone deserves complete love, because every good thing comes from Him. That love is proved by following His Prophet (ﷺ), by loving whom He loves, and it is met by God's (﷾) own love for His servants.
The Qur'an states that believers love Allah (﷾) more than those who set up rivals love their rivals.
Only God (﷾) deserves complete love, trust and fear.
God (﷾) deserves the greatest love because all blessings come from Him and cannot be counted.
The Qur'an makes following the Prophet (ﷺ) the proof of loving God (﷾). In return it promises God's (﷾) love and forgiveness.
Love for the Messenger (ﷺ) is part of loving God (﷾), because following him is what God (﷾) asks. He is loved as God's (﷾) servant, and never worshipped.
In John's Gospel, Jesus ties love to keeping his commandments. In Mark, he names loving God (﷾) with the whole heart as the first commandment.
The Prophet (ﷺ) taught what gives the sweetness of faith. It is to hold Allah (﷾) and His Messenger (ﷺ) dearest, and to love others for Allah's (﷾) sake.
The Qur'an names those God (﷾) loves, and they are the ones who do what His prophets taught.
When God (﷾) loves a servant, He makes the angels and then people love him too.
God's (﷾) love reaches His servants as mercy greater than a mother's. It comes as nearness to anyone who turns toward Him.