ivy_lynx's answer is spot on - space is really, really big, and very easy to hide in, given some basic assumptions. I'll provide some numbers to demonstrate that:
The scales are huge
The largest asteroid is Ceres, which is around 950km across. For perspective, Earth is a bit under 6400km across. Here's an illustration from Wolfram Alpha:

The equivalent to an average human (5' 4" = 162cm) is approximately equal to Harry Potter's glasses. They're large glasses, but they're still much smaller than Daniel Radcliffe (who is about average height).
And remember, we're comparing this to an asteroid that's almost a small planet (although far smaller than our moon). So a spaceship on that scale would cover the US from New York, New York to Cincinnati, Ohio. And even then, it's as relatively small as a pair of glasses on a person. How far away can you get before you can't tell that they're wearing glasses any more? How easy would it be for them to cover up the glasses, simply by raising an arm or turning away?
You can see that it'd be trivial to hide in the shadow of a planet or moon, if you knew you were being observed. Of course, then you'd be very visible from that planet (if it was inhabited), so you need to choose carefully.
What about light?
So, you're able to hide if you're aware there's someone out there, but assume you don't - how hard will it be to spot your lights?
Light falls off according to the Inverse Square Law, which says that it gets fainter with the square of the distance travelled. The Luxor Sky Beam is the strongest human-built beam of light in the world. (I'm ignoring lasers for now, because they don't really illuminate anything.) It's got a brightness of 42.3 billion candela. How bright is it from the moon? Wolfram Alpha says it's approximately 2.976x10^7 candela per square meter (aka 2.976x10^7 lux). That's barely half as bright enough as it needs to be for me to be able to even see it, if it were pointed directly at my eye. If it was pointed at something else? Forget it.
Obviously, by the time we build spaceships, it'll be possible to build brighter lights... but you're still going to have to be very close (relatively speaking) to be able to see them.
For relative comparison, we could fit just under 400 of our Ceres-sized spaceships between the Earth and the Moon.
What about heat?
congusbongus raises an interesting point about heat, but the same issues as light apply. Heat radiation is just infrared (or longer) light, and obeys the same rules as visible light does. On the scales we're talking, you'd easily miss detection on anything that wasn't specialized for space, the same way that your lights would be easily missed.
But that brings us to the assumptions I mentioned at the beginning:
Specialized equipment can do it
It doesn't matter how far away you are, some small portion of your light (or heat) will reach whoever's watching for it. I don't have the knowledge to relate the appropriate numbers from various space projects to the tiny amount of lux I calculated above, but I can say that the longer you watch an area, the better you're going to be able to detect a photon coming from that area. But most of our current highly sensitive satellites only look at a tiny portion of the sky at a time, and vice versa. It's reasonable to assume that there are specialized detectors designed to look for these faint traces and alert when something moves that might possibly be a ship, but they're unlikely to be able to cover the whole 360° sphere of the sky at once. And if you're moving, they won't be able to tell you anything useful.
Likewise, if you happen to move your ship between the detector and a star, they'll be able to notice that if they're looking for it.
But either way, it's still very easy to get physically behind something if you have enough distance, and nothing we have or can design currently can find you through a planet.
Beware of close distances!
All the above applies when there's some distance between you and the person looking for you. You don't even have to paint your ship's hull black to hide, just because it's so hard to see anyone if you're far enough away.
That said, if you're close enough that they can look out a window and see you, there's very little you can do to stop that. No matter what, you'll be occulding stars and radiating heat.