Is there a way in Illustrator to know the exact dimension of shape in pixel and possibly to resize it down to different (but precise) dimension?
If you got multiple objects that you want to resize as one, you need to start by selecting all of those objects with the Selection tool.
Still with the Selection tool, in the upper right corner you will see the width and height boxes that you can use to resize your objects.
Alternatively you will find the same boxes from the top menu:
Window > Transform
If you want to keep aspect ratio, you need to click the chain between the boxes.
Follow the advice in Joonas' answer, but also keep in mind that the pixel dimensions that show up in the control bar will only be accurate when you export at a resolution of 72 ppi. Except when you have a raster image in your Illustrator layout, pixels don't actually exist. What you see on screen is an on-the-fly rendering of the vector art, based on the resolution of your monitor. Those "pixel dimensions" Illustrator gives you are based on its fixed and definite idea that 1 pixel = 1 point. If you export a "500 pixel" wide object at a setting of 300 ppi, the jpeg or png will be over 2,000 pixels wide.
I've not tested how this effects alignment to the pixel grid, but I'm not optimistic that it would necessarily be retained on export at anything other than 72 ppi. Scott may know the answer to that one.
I just wanted to expand on some of the answers already given here. The Height and Width details in the Properties window make this possible (use Window > Properties) if it isn't displayed in your panel to the right.
Once you use "File > Place" to place the image you'd like to work with, you can use the Direct Selection Tool (A) to select it. With it selected, the Properties window changes to give you the exact dimensions of the image. You'll see this in the "W:" and "H:" sections of the window. (See attached.)