Mattu and Trouble have it right. Soul music is heart music... if you write from your heart about real feelings it will translate.
I think where a lot of contemporary religious music loses all but the already converted/true believer audience is that so much of it is
praise music -- basically flattery directed at God. (Check out the story of Job to see God's response to Job's friends' flatteries. He didn't seem to be amused... and, frankly, neither are a lot of modern listeners by the tepid "God is groovy" lyrics of a lot of Christian pop.)
But music that speaks of real spiritual longing and struggle can be so compelling as to make an atheist cry...
I'm not exactly sure if I go for "just replace 'God' with 'girlfriend' " as a strategy for converting one's devotional ouvre to secular use -- but the notion of the interchangeability of same is a time-honored truism about the gospel/R&B connection which I think I first heard from no less an authority on both than Aretha herself (in print -- not over coffee).
(There's a classic Dick Van Dyke where Mary Tyler Moore takes a years later surprising second look at the sonnets an old boyfriend wrote and gave to her... just before he broke off the relationship and became a priest. It's not that funny an episode but I kinda like the sonnet...

)
And there
really are a number of Gospel and other songs that can work either way... just toss a stained glass window and a key spot into the video and you're off and running...
But, at any rate, the same things make a good R&B song as a gospel song: immediacy, sincerity, attention to storytelling and imagery, and artful use of language. We may not know from the lyrics that the author of
Amazing Grace was a reformed slave boat captain -- but we know that the guy in the song has seen the depths of human failure and depravity and yet has finally found refuge in his love for God -- it's powerful stuff.
By the same token there's usually a backstory of some kind a lot of great love songs -- even as things stay vague enough to stay "universal" -- just like good devotional music. The story might not be explicit, it might be hidden in hints, suggestions, metaphors and details -- but it's usually there.