I love and appreciate classical music but I am also interested in writing salsa, merengue, and music with a strong grove and swing feel R&B especially that of 60s Motown, funk, swing, rag/rag time.
What are the strong beats in these styles (for melody writing)?
I am not an expert on each of these styles, but generally the strong beats are still 1 and 3, even though more emphasis may be placed on other beats, such as off-beats. In relationship to harmony and melody writing, harmony should change on 1 and 3 for the most part, and your chord tones would probably also mostly fall on 1 and 3.
A lot of these styles usually involve specific rhythmic patterns and accents that give them the special feel. For instance, Ragtime features a lot of syncopation.
Often, you can find the specific rhythm by looking on wikipedia. For instance, https://en.wikipedia.org/wiki/Merengue_(dance) shows the merengue rhythm just below the main image.