Small and cheap pcb-to-pcb connection
If you need a permanent joint, and you need this to be mass-produced, but you care about space (no room for a connector) or cost (connector is too expensive), you could use hot bar soldering.  

The idea is that a flat cable (usually a special kind of flex pcb) is pressed down by the hot bar so that it makes all the connections at once.  

Example: https://electronics.stackexchange.com/a/3098/26394

If you can overlap the boards (ie: they don't absolutely have to connect edge to edge like puzzle pieces, but the edges can overlap like shingles), you could use z-axis adhesive.