Firstly, you'll need the lat/lon of each postcode and store those in a table along with a geospatial representation (GEOGRAPHY, or GEOMETRY datatype). When a post code is entered by the user, you can the look up that post code in your db to find it's location.
You'll also need to store a GEOGRAPHY/GEOMETRY representation of each of the stores lat/lons you currently have.
Based on that, you can use all of SQL Server's geospatial functionality to perform geospatial searches.
I've made available on GitHub a .NET app that will import the free Ordnance Survey postcode dataset (all post codes in GB) into SQL Server, converting all the Eastings/Northings provided by it, into lat/lon and then creating a geography column. I have a full blog post on that here. The end result would be used like this:
DECLARE @home GEOGRAPHY
SELECT @home = GeoLocation
FROM dbo.PostCodeData
WHERE OutwardCode = 'AB12' AND InwardCode = '3CD' -- Postcode entered by user
-- find all stores within 10 miles of the entered postcode
SELECT *
FROM dbo.Stores
WHERE GeoLocation.STDistance(@home) <= (10 * 1609) -- 1609 = approx metres in 1 mile
Hopefully, this will be a good starting point.