Q:

How can a pirate board a spaceship without teleportation?

Say we have a large cargo spaceship and a small pirate spaceship. The pirate ship is the only one with any sort of weaponry (lasers, missiles etc.), but for the pirates to safely retrieve the cargo, they decide to board the ship and take it manually since teleportation is impossible.
So, how could a pirate board the cargo ship, without letting the precious cargo fly off into space, if a gaping hole in the side of the cargo bay would certainly mean the cargo would get ejected into space?

A:

The canonical solution in scifi is as mentioned by others threaten to open fire unless the ship allows you to board. This is not only practical (unless you have a reputation for killing surrendered crews), but low risk. It is also financially efficient as it keeps the ship and cargo value intact and the crew alive for ransom. It is also generally best solution for the owner as it only causes losses that can be covered by insurance. And paying insurance is generally cheaper than arming the ship so it can defend itself and paying the crew for fighting. Exception is if the pirates have a reputation for killing crews or the piracy is actually part of some sort of an ongoing larger conflict.
But that is rare as pirates generally hate fighting, there is no profit. Everything you spend on fighting reduces profit and increases risk. So most pirates try to keep surrender the best option by not killing surrendered people unless necessary. Incompetence and stupidity does exist though. As do insane people and religious fanatics.
In addition to being common in scifi this is how most real pirates have operated. Fighting is only done until one side thinks fighting is more dangerous than giving up. Usually which side is stronger gets obvious without unnecessary bloodshed.

A:

One way would be to use suction pads. 
The problem is that suction pads use air pressure in order to work, so they do not work in a vacuum. That means that you cannot attach a suction pad on the outside of a spaceship. However you can attach it inside, in order to create an airlock. Here is how it would work:

Before creating an airlock, you need to be firmly attached to the ship. That can be made thanks to a sort of harpoon. Once the harpoon has gone through the hull of the big ship, it opens up and liberates a plastic circle, which mill make your suction pad. What happens is that when the air inside the ship will try to escape, it will actually push the membrane, so that it will cover the hole. Then the difference of pressure between the air inside the ship and the void outside will keep the membrane in place.
With enough harpoons, you can get a good grip on the big ship. Now to create the air-lock. It is the same principle. You project a big tube towards the hull of the big ship. Once you are through, you deploy membranes that will prevent the air from escaping. 

Edit: The basic shape of the harpoons would be something close to umbrellas, which would open once inside the ship. The "inside" of the umbrella would at pressure zero thanks to the hole you just made, and the "outside" would be at room pressure. The ribs can also help to reinforce the harpoon, much as the barbs of real-life harpoons.
Concerning the air lock, the things you deploy have something like a corona-shape.
Two more things I did not mention:

The defending ship has no interest in breaking your harpoons since that would result in the depressurization of their ship.
A good way to prevent the suction pads from working would be to depressurize the defending ship. However your harpoons would still work, just like regular harpoons.

A:

Your question already assumes that the cargo ship is weaponless, and we'll also assume for the sake of simplicity that the pirates have already taken care of any escorts that might be around, so they aren't in any danger of getting blown out of the figurative water.  The problem now is - they need to get the precious cargo off the cargo ship.  For that, I see three possible ways to enter the ship: 

Boarding Through Airlocks
The most obvious way is to simply slip spacesuits on and pop open an airlock from the outside.  Any space-faring vessel should have some type of de-pressurizing zone the pirates can use to their advantage to access and enter the ship.  
Depending on your priates' style, this can be done either after they've done precision damage to render the ship immobile, or mid-flight and stealthily to avoid any detection whatsoever. 

Make-Your-Own-Airlock
If for some reason the ship doesn't have an entryway, they could make one on their own.  Simply give your pirates an attachment to the ship that manually digs into the hull, preferably 'locking-on' like a claw, that allows the pirates to connect one ship to another for easy boarding.  
It doesn't matter if they then leave a huge hole in the ship's hull after they leave - they're pirates.  They got the cargo.  Let the poor saps with a hole in their ship worry about that.  

Just Use The Vacuum
The pirates are trying to get the cargo out of the cargo carrier.  For them, letting the vacuum of space do the work for them.  From there, it's just a matter of snatching the cargo out of space - either by hand with space suits, or just by flying by and scooping it into the ship through a de-pressurized 'mouth' piece, ideal for taking cargo out of the motionless vacuum of space.  (Or Tractor Beams, if you want to have those).  

