A shed should be placed at least ten feet from your residence if it doesn't require a planning permit. Sheds that are large or complex enough to require a planning permit are usually required to be forty feet or more from the house.
The purpose of separating a shed from the home is to prevent flammable materials in the shed from potentially catching fire to the main residence. The separation between the two buildings also helps prevent snow and rain build-up between them.