There has never been complete agreement on who actually composed the song (Paul Rice? Oliver Hood?), though it is generally credited to singer-politician Jimmie Davis because he and his associate Charles Mitchell purchased the song and rights from one of its previous 'composers.' See the \"You Are My Sunshine\" entry on the SecondHandSongs website for a more detailed discussion.
From 78rpm OKeh 6211 - You Are My Sunshine (Davis-Mitchell) by Tommy Tucker Time, vocal by Don Brown and Voices Three, recorded in NYC May 8, 1941