It basically all comes down to the fact that light takes the shortest^{*} path between two points. If you have curved space-time, the shortest path is no longer a straight line, but a curved path (much like the shortest path along the earth's surface between two points is a curve). If the light is traveling through some medium other than vacuum, that material slows the light down according to its *index of refraction* (higher index = slower). If light travels through such a medium, it changes direction to minimize its travel time, which is why it bends.

There is a branch of modern optics called *transformation optics* which uses the mathematics of general relativity to design material structures that bend light in some desired way. (The well-known optical "cloaks" are an example of this.) This field works because light takes the shortest path in both the GR case and the case of a medium with a varying index of refraction.

*: Actually, light takes an *extremal* path, which is either longest or shortest.