Since the configuration space is the set of all possible configurations the link can have, i.e. all possible angles from 0° to 360°, shouldn't the c-space be a line rather than a circle?
You are correct that a rotating link has one variable $\theta$ that can attain any value in the range $[0, 2\pi]$ (let's talk in radian). However, the configuration space of the link is not simply a line segment because the link being at $\theta = 2\pi$ is identical to it being at $\theta = 0$. In other words, the link can keep rotating forever while the variable $\theta$ simply runs in loops, like a clock.
If there was an ant walking on the line segment to the right, when the ant reaches $\theta = 2\pi$, it would somehow be teleported and appear at $\theta = 0$ and continue walking like nothing happened.
This is essentially the same as gluing both ends of the line segment together. That's why you have a circle instead of only a line segment.
Also, for a 2 link robotic arm in the same plane, how is the c-space a 2-tourus even though the joints rotate in the same plane?
I understand that this may be confusion between the robot's workspace and the robot's configuration space.
The joints rotate in the same plane so their workspace is a subset of that two-dimensional plane.
Now for the configuration space of this robot, the same argument as above applies. Initially, you can think of a configuration space as a square whose corners are $(\theta_1, \theta_2) = (0, 0)$, $(\theta_1, \theta_2) = (0, 2\pi)$, $(\theta_1, \theta_2) = (2\pi, 2\pi)$, and $(\theta_1, \theta_2) = (2\pi, 0)$.
The first link (the one attached to the base) of the robot could continue rotating forever while the joint value $\theta_1$ would only vary within the range $[0, 2\pi]$. If there was an ant walking from left to right on the square, the ant could continue walking forever as previously. It is like the left edge and the right edge are glued together.
The second link could also keep rotating forever while the joint value $\theta_2$ could only run between $0$ and $2\pi$. In the end, this is like gluing the top edge and the bottom edge together.
In topology, this gluing process is called identification.
Finally, when you glue the two pairs of edges of the square together, you get a 2-torus.
(image from https://en.wikipedia.org/wiki/Torus)
Lastly what's the difference between the representations shown below?
The two images show the same thing before and after the identification (gluing) process. Notice the arrow heads on the edges of the square in the left image. They tell you which sides match and how they should be aligned when being glued together.