There are a few ways of doing this, but here is one. Amend your homepage template to have an "Image" field called "Site background", then on your Home item select an image in the Site Background field from your media library. You can then use code like this in your layout view.
// get the home page item
Item home = Sitecore.Context.Database.GetItem(Sitecore.Context.Site.StartPath);
// get the image field that contains the background
ImageField imageField = home.Fields["Site Background"];
// get its url
string url = Sitecore.Resources.Media.MediaManager.GetMediaUrl(imageField.MediaItem);
<body style="background-image:url(@url); background-repeat: repeat;">
<div style="border: 2px dashed green; background:white; padding:10px;">
@Html.Sitecore().Field("Site Background", home)
Note I'm not saying the above code is "best practice", you'll need to do some null checking, put the code in a controller rather than on the view etc, this is just for demonstration purposes. You might also want to do something nicer with the div that has the edit field inside it, like show it on mouseover, or you might not want it on the page at all and you might be happy setting the background image from the Content Editor.