How do songwriters write songs for other singers?
To write for another singers/artist requires that you understand what message or image they portray. Every singer picks certain songs because they want to express their beliefs.
A good way to start is to go through and listen to past songs. If their is any press or interviews in the media check them out. That way you can get a decent representation of what they stand for. If you can, contact them directly or though their manager or producer. They will have valuable insight into what the singer is wanting.
It is also important to know and understand the music genre that they are most comfortable with. As a songwriter to also must be comfortable that the same genre.
When writing a melody, write in such a way as to match the range of the singer.
Depending on what access you have to the singer and if you have an existing relationship you may consider co-writing a song. Of course the more popular the singer is the more difficult this will be. However, if it a new or emerging singer there can be less barriers.