What does Matthew 5:45 mean?
God loves everyone in the world, both the good people and those who are evil. How do we know that? Jesus offers one bit of evidence: God causes the sun to shine and the rain to fall on everyone, no matter who they are or what they are guilty of. God is the provider, and He provides good in this way and countless other ways to all people.Jesus has commanded His disciples to love their enemies and to pray for those who persecute them (Matthew 5:43–44). Now He gives one reason for doing so: this is to imitate God the Father, as earthly sons imitate their fathers. Jesus describes imitating the Father as a way to become one of His Sons.
Theologians refer to God's goodness to everyone, no matter who they are, as "common grace." Jesus has described His disciples as the "light of the world" (Matthew 5:14–16). God is the source of the light in His people. Born-again believers are the tools with which He distributes His light into the spiritual darkness of the world. One of the ways God shows His light through us is when believers love their enemies the way God loves them.
The big picture in this is that nobody is beyond God's redemption by grace through faith in Christ. Believers attract people to faith in Christ when they give good in exchange for evil, and when they pray for those who bring them pain.