There are three temples in Stanley, all in close walking distance of the market. While you are in the area don't fail to visit at least one, or why not visit all?
Tin Hau Temple
Just west of Stanley market, adjoining the Plaza, is this 1767 temple was supposedly built by a famous pirate. The oldest of the more than 70 Tin Hau temples in Hong Kong it is quite a modern building due to repeated building and rebuilding.
Pak Tai Temple
The most distant of the temples it is still within 20 minutes walk, much of it within the green Stanley Ma Hang Park. The last little bit is down some very steep steps though so this does not count as accessible. If that doesn't bother you then it is well worth the visit for even though the temple itself is tiny the location right on the edge of the cliffs overlooking the sea is without equal in the area. If you can't reach the temple itself there are good views of it from Blake Pier.
Kwun Yum Temple
Also accessible via Stanley ma Hang Park this temple is up the hill and features a large statue of the goddess.
Tai Wong Temple
Next to the roundabout at the end of Stanley Main Street.