A good funeral sermon is remarkably short. Depending upon circumstances, you can digress a bit to tell some stories, but most of the time, your main audience is under a lot of stress. It's too much to ask them to endure a long, intricate (or passionate) address. Get it said, and get it over. Make it worth their while by being brief enough for them to hold it all in their heads and consider it.
Most funeral sermons say the same, basic things; or rather, they set out to accomplish the same, basic goals. The first thing is to tell people it is okay to hurt. Give them permission to grieve. They probably feel pretty crappy right now, since someone important to them has died. Describe it just enough so they know that you're talking about them, in this situation.
Next, talk about the person who has died. You aren't out to make the deceased out to be Mother Theresa, but you want to make reference to the guy who's actually being missed. A little humor is fine. Quote a line or two typical of the person, if you can. Personal reminiscences are great, but don't overdo your relationship with the deceased; you aren't the chief mourner.
And how do you talk about someone you don't know very well? Easy! You listen. Hang around the visitation a bit. Listen to what people are saying, how they remember this person, what's been bothering them. Don't talk; listen. Then reflect back the person they miss to them; address their fears. Comfort them with their memories, or with the absolving grace of saying, you did all you could, or (in awful circumstances) how God alone will judge -- and he loves us.
Finally, remember that it is not your job to preach this person into heaven or judge anybody's life. Is is your job to preach the Gospel to people who are hurting. We proclaim God's grace in Jesus Christ. We offer his peace. We claim his promises. We should NOT bore or bother people with theories of the Afterlife or moral casuistry or personal testimonies or altar calls. We stand in Christ's place, offering all that he is and has to these mourners, and commending the soul of the person who has died to a loving and just God.
Then we pray. With thanksgiving. And faith. And then we shut up, and go on to the next part of the service.
The hard part of doing a funeral sermon is to sum all these things up in a way that is unique to this Loved One and this situation. It's almost like writing a sonnet: it is a very restrictive form. But if you've mastered the form, then it becomes easier to use it to say something that will really matter to someone -- when it really matters that you be able to do it.