I understand you have to play around with the cubes in order to get the answer. You just know what the fronts and backs; and lefts and rights of each cube are going to be.
"To solve the game, the first graph represents the front and back faces, and the second graph represents the top and bottom faces. Align the cubes according to which edges you have in your two graphs. There is some choice on how to do this; for example, on the game above, cube 1 has the front and back faces blue and green, and the top and bottom faces red and yellow. However, we do not yet know whether blue is on the front or back. You may have to play around a little to arrange your cubes appropriately."
I think all of the cubes are fine the way they are except for the second cube. If you play around with the second cube, then you'll see that if you if you flip it (front becomes back, and back becomes front, but right stays right and left stays left) then you have a valid answer that fits your graph.
EDIT: I think I noticed something. If you think of each of the two graphs as a path, in which you can only walk in one direction, then fill in the answers that way. So you went from R to W, W to G, G to B, and B-R for the blue graph. See how that is one continuous path, and you can fill out your chart in that order. Same thing with the orange graph, even if lines 1 and 2 are not connected. Think of the path as going from red to green to white to black back to red. So you would fill out R to G, then W to B, then G to W, and then B to R in your chart. I don't know if this is actually true, but just a theory.
I am puzzled by the absence of information on how the cubes are actually coloured.
what colour is used for the remaining faces?
are the colours applied the same for all dices (like standard dice have the dots painted in the same relative arrangement)?
how are the colours distributed? Are there all blue cubes?
To compensate for this lack of information, I came up with this story:
Assuming that we use a simple bot without camera to perform the manual labour of stacking the dice.
There are 6 ways to choose the front face, times 4 orientations = 24 configurations.
This applies to four cubes and gives
$$
24 \times 24 \times 24 \times 24
$$
trial configurations.
The control mechanism has colour detection, and it inspects only the four sides.
However
The validity of the pattern along the sides is the same (either matching the criterion or not) if we rotate the column as a whole in one of four ways,
reduction by factor 4 is possible.
The validity of the pattern is the same, if we turn the whole column upside down or not, reduction by factor 2 is possible.
So we would try to provide a software update to the bot, which just tries
$$
3 \times 24 \times 24 \times 24
$$
times and is guaranteed to stack up a valid configuration, if it exists.
Update: I found a page about this puzzle Instant Insanity, the cubes are coloured indeed by $4$ colours applied to the 6 faces. It turns out that the $4^6 = 4096$ ways to colour $6$ faces with $4$ colours reduce to $240$ possibilites if one considers rotations. (Link) The producers of this puzzle pick a specific set of $4$ out of the $240$ possible cubes which has exact one solution.
Best Answer
I guess the key is the hamiltonicity of the subraphs...In particular the subgraph have to be connected so you cannot choose edges with loops because the condition "Each vertex must have degree 2" would force you to disconnect your graph. It reduces a lot the possibilies when you try to construct the Hamiltonian subraphs.