When I was a college worship director for a couple of years, I put together and helped edit a lot of lyrics on PowerPoint. One recurring question I had was: Is it O Lord or Oh, Lord?
By default I found myself using the first, though I was never really sure why (I thought it looked better).
According to this article, O Lord is correct, when addressing a petition, prayer, or other saying to God.
One thing I’m still stuck on, though–if O is proper for use with vocatives, why is there not also a comma after it?