Having a foreclosure next door is going to hurt. If it sells at a low foreclosure price, that might tend to drag down an appraiser's evaluation of your own house. If it doesn't sell, an abandoned house next door won't make yours look good. Even if it's across the street or a few houses down, a foreclosure in the neighborhood may affect your home's value for the worse.
The standard method for appraising your house is to look at what comparable neighborhood homes have sold for in the past few months. When a house sells at a foreclosure auction, it's often for less than full market price: if an appraiser then uses the neighboring house as one of the "comps," it's going to lower the value of yours. The circumstances aren't the same if you're not in foreclosure too, but appraisers may still consider the foreclosure a valid basis for comparison.
If the house doesn't sell, the bank may just let it sit there until the market improves. Banks aren't property managers, so the home may linger without any maintenance or care for months. If the homeowner left before the foreclosure forced him out, the home may stay unoccupied and uncared for even longer. When an appraiser or a possible buyer shows up at your house, seeing an abandoned, unkempt property next door makes the street seem less desirable to live on.
Having the house unoccupied may be only the start of your woes. In some cases, drug dealers or vagrants have used abandoned foreclosures as squats or places to do business. If you live in a homeowner's association, a foreclosure hurts the association finances, too. Homeowners in foreclosure often can't or won't pay their fees, and the bank may not bother to pay, either. Without that money -- especially if several homes in the neighborhood have foreclosed -- the association can't maintain the neighborhood's common areas as easily, which can drag down values further.
If an abandoned house is blighting your neighborhood, calling the lender and asking them to maintain it may get results. If the lender doesn't cooperate, you can give the city's code-enforcement department a call. Code enforcement can slap steep fines on whoever is responsible for letting the house become derelict. Homeowners associations sometimes sue the bank to get fees from them. In a few cases, homeowners have gone to an abandoned house and done at least basic maintenance themselves, to improve the look of the street.